Events
31 Mar, 11 pm - 2 Apr, 11 pm
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
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 a log shipping secondary database in SQL Server by using SQL Server Management Studio or Transact-SQL.
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 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.
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
Events
31 Mar, 11 pm - 2 Apr, 11 pm
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayTraining
Module
Migrate SQL Server workloads to Azure SQL Database - Training
Learn the essentials of Azure SQL Database deployment and migration. Explore its benefits, exclusive features, and migration options while optimizing performance and application connections for a smooth transition to the cloud.
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.
Documentation
View log shipping report (SSMS) - SQL Server
View the Transaction Log Shipping Status report in SQL Server Management Studio. Run a status report at a monitor server, primary server, or secondary server.
sp_delete_log_shipping_secondary_database (Transact-SQL) - SQL Server
Removes a secondary database and removes the local history and remote history.
Remove Log Shipping (SQL Server) - SQL Server
Learn how to remove log shipping by using SQL Server Management Studio or Transact-SQL in SQL Server.