EXEC master.dbo.sp_delete_log_shipping_primary_secondary
@primary_database = N'DB1'
,@secondary_server = N'PrimaryServer'
,@secondary_database = N'DB1_DR'
sp_delete_log_shipping_secondary_database
@secondary_database = 'DB1_DR'
sp_delete_log_shipping_primary_database
@database = 'DB1'
EXEC sp_help_log_shipping_monitor_primary
@primary_server = 'PrimaryServer',
@primary_database = 'DB1'
EXEC sp_help_log_shipping_monitor_secondary
@secondary_server = 'SecondaryServer',
@secondary_database = 'DB1_DR'
SELECT *
FROM msdb..log_shipping_monitor_primary
WHERE primary_server = 'PrimaryServer'
AND primary_database = 'DB1'
-- Here is the choice. Disable it, or delete it. your call
--UPDATE msdb..log_shipping_monitor_primary SET threshold_alert_enabled=0 WHERE primary_id ='E244490E-1ACA-470B-8C5A-B99F7B817EC4'
--DELETE FROM msdb..log_shipping_monitor_primary WHERE primary_id ='E244490E-1ACA-470B-8C5A-B99F7B817EC4'
-- make sure it is gone.
SELECT *
FROM msdb..log_shipping_monitor_primary
WHERE primary_server = 'PrimaryServer'
AND primary_database = 'DB1'
--Check the ID against the table by selecting only the combination of secondary server and secondary database
SELECT *
FROM msdb..log_shipping_monitor_secondary
WHERE secondary_server='SecondaryServer' and secondary_database='DB1_DR'
-- Same deal here, disable or remove it
--UPDATE msdb..log_shipping_monitor_secondary SET threshold_alert_enabled=0 WHERE secondary_id ='CC8A539C-59AA-4304-979C-33E56503C0A8'
--DELETE FROM msdb..log_shipping_monitor_secondary WHERE secondary_id ='CC8A539C-59AA-4304-979C-33E56503C0A8'
-- make sure it is gone.
SELECT *
FROM msdb..log_shipping_monitor_secondary
WHERE secondary_server='SecondaryServer' and secondary_database='DB1_DR'
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (1)
Commented: