Showing posts with label planner. Show all posts
Showing posts with label planner. Show all posts

Monday, March 19, 2012

Log Shipping Monitor

Hello,
I have configured a SQL Server for Log Shipping using the Database Maintenan
ce Planner Wizard. Now a Log Shipping Monitor object appears below the Manag
ement folder. How do I reverse this process, and make the Log Shipping Monit
or disappear? In other word
s I want to revert back to the state SQL Server was in before I ran the Data
base Maintenance Planner.
Thanks,
Jerome SmithHello all,
I'll answer my own question for everybody's benefit. Eliminating the Log Shi
pping Monitor is equivalent to eliminating all Log Shipping pairs from the L
og Shipping system database. This is done with the stored procedure:
sp_delete_log_shipping_primary
located in the msdb system database.
Following is the help article.
Cheers,
Jerome
sp_delete_log_shipping_primary
Deletes the primary server from the log_shipping_primaries table.
Syntax
sp_delete_log_shipping_primary
[ @.primary_server_name = ] 'primary_server_name' ,
[ @.primary_database_name = ] 'primary_database_name' ,
{ [ @.delete_secondaries = ] delete_secondaries }
Arguments
[@.primary_server_name =] 'primary_server_name'
Is the name of the primary server. primary_server_name is sysname.
[@.primary_database_name =] 'primary_database_name'
Is the name of the secondary server. primary_database_name is sysname.
[@.delete_secondaries =] delete_secondaries
Specifies that the delete action is also applied to log_shipping_secondaries
table. delete_secondaries is bit, with a default of zero (0).
Return Code Values
0 (success) or 1 (failure)
Remarks
This stored procedure only removes the primary and secondary server from the
monitor. Log shipping still has to be removed from the primary and secondar
y servers.
sp_delete_log_shipping_primary deletes a log shipping primary table. If ther
e are corresponding rows in the log_shipping_databases table, delete_seconda
ries must be set to one (1) or the stored procedure will fail.
Permissions
Only members of the sysadmin fixed server role can execute sp_delete_log_shi
pping_primaries.
Examples
This example deletes the source database "pubs" from the server "source". Th
ere are no corresponding rows in log_shipping_secondaries table.
EXEC sp_delete_log_shipping_primary @.primary_server_name = N'source', @.pri
mary_database_name = N'pubs'
?1988-2000 Microsoft Corporation. All Rights Reserved.|||Actually, when nothing has gone wrong, the easiest way is in Enterprise
Manager:
Management->Database Maintenance Plans->Right-Click->Properties->Log
Shipping->Remove Log Shipping.
Then delete Plan.
Jerome
"Jerome Smith" <jerosmith@.hotmail.com> escribi en el mensaje
news:3B6447C3-7819-4F31-983B-7BDD84D2311F@.microsoft.com...
> Hello all,
> I'll answer my own question for everybody's benefit. Eliminating the Log
Shipping Monitor is equivalent to eliminating all Log Shipping pairs from
the Log Shipping system database. This is done with the stored procedure:
> sp_delete_log_shipping_primary
> located in the msdb system database.
> Following is the help article.
> Cheers,
> Jerome
> sp_delete_log_shipping_primary
> Deletes the primary server from the log_shipping_primaries table.
> Syntax
> sp_delete_log_shipping_primary
> [ @.primary_server_name = ] 'primary_server_name' ,
> [ @.primary_database_name = ] 'primary_database_name' ,
> { [ @.delete_secondaries = ] delete_secondaries }
> Arguments
> [@.primary_server_name =] 'primary_server_name'
> Is the name of the primary server. primary_server_name is sysname.
> [@.primary_database_name =] 'primary_database_name'
> Is the name of the secondary server. primary_database_name is sysname.
> [@.delete_secondaries =] delete_secondaries
> Specifies that the delete action is also applied to
log_shipping_secondaries table. delete_secondaries is bit, with a default of
zero (0).
> Return Code Values
> 0 (success) or 1 (failure)
> Remarks
> This stored procedure only removes the primary and secondary server from
the monitor. Log shipping still has to be removed from the primary and
secondary servers.
> sp_delete_log_shipping_primary deletes a log shipping primary table. If
there are corresponding rows in the log_shipping_databases table,
delete_secondaries must be set to one (1) or the stored procedure will fail.
> Permissions
> Only members of the sysadmin fixed server role can execute
sp_delete_log_shipping_primaries.
> Examples
> This example deletes the source database "pubs" from the server "source".
There are no corresponding rows in log_shipping_secondaries table.
> EXEC sp_delete_log_shipping_primary @.primary_server_name = N'source',
@.primary_database_name = N'pubs'
> 1988-2000 Microsoft Corporation. All Rights Reserved.
>
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.629 / Virus Database: 403 - Release Date: 17-03-2004