Events
Mar 31, 11 PM - Apr 2, 11 PM
The ultimate SQL, Power BI, Fabric, and AI community-led event. March 31 - April 2. Use code MSCUST for a $150 discount.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
This topic describes how to remove log shipping in SQL Server by using SQL Server Management Studio or Transact-SQL.
In This Topic
Before you begin:
To remove log shipping, using:
The log-shipping stored procedures require membership in the sysadmin fixed server role.
Connect to the instance of SQL Server that is currently the log shipping primary server and expand that instance.
Expand Databases, right-click the log shipping primary database, and then click Properties.
Under Select a page, click Transaction Log Shipping.
Clear the Enable this as a primary database in a log shipping configuration check box.
Click OK to remove log shipping from this primary database.
On the log shipping primary server, execute sp_delete_log_shipping_primary_secondary to delete the information about the secondary database from the primary server.
On the log shipping secondary server, execute sp_delete_log_shipping_secondary_database to delete the secondary database.
Note
If there are no other secondary databases with the same secondary ID, sp_delete_log_shipping_secondary_primary is invoked from sp_delete_log_shipping_secondary_database and deletes the entry for the secondary ID and the copy and restore jobs.
On the log shipping primary server, execute sp_delete_log_shipping_primary_database to delete information about the log shipping configuration from the primary server. This also deletes the backup job.
On the log shipping primary server, disable the backup job. For more information, see Disable or Enable a Job.
On the log shipping secondary server, disable the copy and restore jobs.
Optionally, if you are no longer using the log shipping secondary database, you can delete it from the secondary server.
Add a Secondary Database to a Log Shipping Configuration (SQL Server)
Remove a Secondary Database from a Log Shipping Configuration (SQL Server)
About Log Shipping (SQL Server)
Log Shipping Tables and Stored Procedures
Events
Mar 31, 11 PM - Apr 2, 11 PM
The ultimate SQL, Power BI, Fabric, and AI community-led event. March 31 - April 2. Use code MSCUST for a $150 discount.
Register todayTraining
Module
Back up and restore your Azure SQL database - Training
Learn how to protect the data in your Azure SQL database and recover from data loss or corruption with backup and restore.
Certification
Microsoft Certified: Azure Database Administrator Associate - Certifications
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.