How to: Add a Secondary Database (Transact-SQL)
This topic explains how to add a secondary database to a log shipping configuration using SQL Server Transact-SQL.
To add a secondary database
On the secondary server, execute sp_add_log_shipping_secondary_primary supplying the details of the primary server and database. This stored procedure returns the secondary ID and the copy and restore job IDs.
On the secondary server, execute sp_add_jobschedule to set the schedule for the copy and restore jobs.
On the secondary server, execute sp_add_log_shipping_secondary_database to add a secondary database.
On the primary server, execute sp_add_log_shipping_primary_secondary to add the required information about the new secondary database to the primary server.
On the secondary server, enable the copy and restore jobs.
See Also