Specifies that a database on the primary server is being log shipped.
sp_add_log_shipping_database [ @db_name = ] 'db_name' ,
[ @maintenance_plan_id = ] maintenance_plan_id
[@db_name =] 'db_name'
The name of the database log shipped. The name must exist in sysdatabases. db_name is sysname.
[@maintenance_plan_id =] maintenance_plan_id
The maintenance plan responsible for backing up the transaction log of this database. maintenance_plan_id is uniqueidentifier, with a default of NULL.
Return Code Values
0 (success) or 1 (failure)
Only members of the sysadmin fixed server role can execute sp_add_log_shipping_database.
EXEC msdb.dbo.sp_add_log_shipping_database N'pubs'