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
Expand Minimize


SQL Server 2000

Deletes the primary server from the log_shipping_primaries table.


    [ @primary_server_name = ] 'primary_server_name' ,
    [ @primary_database_name = ] 'primary_database_name' ,
    { [ @delete_secondaries = ] delete_secondaries }


[@primary_server_name =] 'primary_server_name'

Is the name of the primary server. primary_server_name is sysname.

[@primary_database_name =] 'primary_database_name'

Is the name of the secondary server. primary_database_name is sysname.

[@delete_secondaries =] delete_secondaries

Specifies that the delete action is also applied to log_shipping_secondaries table. delete_secondaries is bit, with a default of zero (0).

Return Code Values

0 (success) or 1 (failure)


This stored procedure only removes the primary and secondary server from the monitor. Log shipping still has to be removed from the primary and secondary servers.

sp_delete_log_shipping_primary deletes a log shipping primary table. If there are corresponding rows in the log_shipping_databases table, delete_secondaries must be set to one (1) or the stored procedure will fail.


Only members of the sysadmin fixed server role can execute sp_delete_log_shipping_primaries.


This example deletes the source database "pubs" from the server "source". There are no corresponding rows in log_shipping_secondaries table.

EXEC   sp_delete_log_shipping_primary @primary_server_name = N'source', @primary_database_name = N'pubs'
© 2015 Microsoft