title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | helpviewer_keywords | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Remove log shipping secondary |
Learn how to remove a log shipping secondary partner by using SQL Server Management Studio or Transact-SQL in SQL Server. |
MikeRayMSFT |
mikeray |
03/14/2017 |
sql |
log-shipping |
how-to |
|
[!INCLUDE SQL Server] This topic describes how to remove a log shipping secondary database in [!INCLUDEssnoversion] by using [!INCLUDEssManStudioFull] or [!INCLUDEtsql].
In This Topic
-
Before you begin:
-
To remove a log shipping secondary database, using:
The log-shipping stored procedures require membership in the sysadmin fixed server role.
-
Connect to the instance of [!INCLUDEssNoVersion] 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.
-
Under Secondary server instances and databases, click the database you want to remove.
-
Click Remove.
-
Click OK to update the configuration.
-
On the primary server, execute sp_delete_log_shipping_primary_secondary to delete the information about the secondary database from the primary server.
-
On the 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 secondary server, disable the copy and restore jobs. For more information, see Disable or Enable a Job.
About Log Shipping (SQL Server)
Log Shipping Tables and Stored Procedures