Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Remove a Secondary Database from a Log Shipping Configuration (SQL Server)


This topic describes how to remove a log shipping secondary database in SQL Server 2016 by using SQL Server Management Studio or Transact-SQL.

In This Topic

The log-shipping stored procedures require membership in the sysadmin fixed server role.

Arrow icon used with Back to Top link

To remove a log shipping secondary database

  1. Connect to the instance of SQL Server that is currently the log shipping primary server and expand that instance.

  2. Expand Databases, right-click the log shipping primary database, and then click Properties.

  3. Under Select a page, click Transaction Log Shipping.

  4. Under Secondary server instances and databases, click the database you want to remove.

  5. Click Remove.

  6. Click OK to update the configuration.

Arrow icon used with Back to Top link

To Remove a Secondary Database

  1. On the primary server, execute sp_delete_log_shipping_primary_secondary to delete the information about the secondary database from the primary server.

  2. On the secondary server, execute sp_delete_log_shipping_secondary_database to delete the secondary database.


    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.

  3. On the secondary server, disable the copy and restore jobs. For more information, see Disable or Enable a Job.

Arrow icon used with Back to Top link

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft