sqlnIGHTS.COM

My Sql Server info repository

Remove logShipping

How to Remove Logshipping in 2 Easy Steps

If you want to remove log shipping from a primary database then here is how to do it using TSQL code.

Step 1 

  • On Your primary server run the following code:

EXEC MASTER.dbo.sp_delete_log_shipping_primary_secondary

@primary_database = N’Primary_db_Name’,

@secondary_server = N’Secondary_Server_Name’,

@secondary_database = N’Secondary_Database_Name’

GO

EXEC MASTER.dbo.sp_delete_log_shipping_primary_database @database = N’Primary_db_name’

GO

Step 2

  • On your secondary server run the following code:

EXEC MASTER.dbo.sp_delete_log_shipping_secondary_database @secondary_database = N’Secondary_db_Name’

 

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s