title | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | dev_langs | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sp_delete_log_shipping_secondary_primary (Transact-SQL) |
Removes the information about the specified primary server from the secondary server, and removes the copy job and restore job from the secondary. |
MashaMSFT |
mathoma |
randolphwest |
01/23/2024 |
sql |
system-objects |
reference |
|
|
|
[!INCLUDE SQL Server]
sp_delete_log_shipping_secondary_primary
removes the information about the specified primary server from the secondary server, and removes the copy job and restore job from the secondary.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
sp_delete_log_shipping_secondary_primary
[ @primary_server = ] N'primary_server'
, [ @primary_database = ] N'primary_database'
[ ; ]
The name of the primary instance of the [!INCLUDE ssDEnoversion] in the log shipping configuration. @primary_server is sysname, and can't be NULL
.
The name of the database on the primary server. @primary_database is sysname, with no default.
0
(success) or 1
(failure).
None.
sp_delete_log_shipping_secondary_primary
must be run from the master
database on the secondary server. This stored procedure does the following:
- Deletes the copy and restore jobs for the secondary ID.
- Deletes the entry in log_shipping_secondary.
- Calls
sp_delete_log_shipping_alert_job
on the monitor server.
Only members of the sysadmin fixed server role can run this procedure.