Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
SQL Server
This article describes how to remove log shipping in SQL Server by using SQL Server Management Studio or Transact-SQL.
Use SQL Server Management Studio
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 select Properties.
Under Select a page, select Transaction Log Shipping.
Clear the Enable this as a primary database in a log shipping configuration check box.
Select OK to remove log shipping from this primary database.
Use Transact-SQL
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_primaryis invoked fromsp_delete_log_shipping_secondary_databaseand 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_databaseto 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're no longer using the log shipping secondary database, you can delete it from the secondary server.
Permissions
The log-shipping stored procedures require membership in the sysadmin fixed server role.
Related tasks
- Upgrade SQL Server with log shipping (Transact-SQL)
- Configure Log Shipping (SQL Server)
- Add a Secondary Database to a Log Shipping Configuration (SQL Server)
- Remove a Secondary Database from a Log Shipping Configuration (SQL Server)
- Monitor Log Shipping (Transact-SQL)
- Fail Over to a Log Shipping Secondary (SQL Server)
- Disable or Enable a Job