sp_delete_log_shipping_database

Transact-SQL Reference

Transact-SQL Reference

sp_delete_log_shipping_database

Deletes a database from the log_shipping_databases table on the primary server.

Syntax

sp_delete_log_shipping_database [ @db_name = ] 'db_name'

Arguments

[@db_name =] 'db_name'

Is the name of the database no longer log shipped. db_name is sysname.

Return Code Values

0 (success) or 1 (failure)

Remarks

Execute this stored procedure to indicate that the database is no longer being log shipped. After this action takes place, sqlmaint will stop updating the monitor server when transaction logs for this database are backed up.

Permissions

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

Examples

This example assumes that the pubs database was previously added by executing the sp_add_log_shipping_database.

EXEC   msdb.dbo.sp_delete_log_shipping_database @db_name = N'pubs'