The other day, I came accross a scenario where I need to remove log shipping from a database on the primary server. However, we have already shutdown/decommissioned the secondary server. If we try to disable the log shipping from the database properties window, we would most like get the following:
We would need to remove it manually using the following T-SQL script:
USE [master]
GO
EXEC sp_delete_log_shipping_primary_secondary @primary_database = '[Database_Name]', @secondary_server = '[Secondary_Server_Name]', @secondary_database = '[Database_Name]';
GO
EXEC sp_delete_log_shipping_primary_database @database = '[Database_Name]'
GO
References:
- Information on sp_delete_log_shipping_primary_secondary can be found on https://technet.microsoft.com/en-us/library/ms189467.aspx
- Information on sp_delete_log_shipping_primary_database can be found on https://msdn.microsoft.com/en-us/library/ms188799.aspx
Thanks
ReplyDeleteThanks for help.
ReplyDelete