Export (0) Print
Expand All
Expand Minimize

sp_update_log_shipping_plan_database

SQL Server 2000

Updates an existing database that is part of a log shipping plan.

Syntax

sp_update_log_shipping_plan_database
    [@destination_database =] 'destination_database',
    [@load_delay =] load_delay,
    [@load_all =] load_all,
    [@file_retention_period =] file_retention_period,
    [@copy_enabled =] copy_enabled,
    [@load_enabled =] load_enabled
    [@recover_db =] recover_db
    [@terminate_users =] terminate_users

Arguments

[@destination_database =] 'destination_database'

Is the name of the secondary database. destination_database is sysname and must be supplied.

[@load_delay =] load_delay

Is the length of time, in minutes, before the transaction log is loaded. load_delay is int, with a default of zero (0).

[@load_all =] load_all

Specifies whether all newly copied transaction logs are loaded when the job is run. A value of zero (0) means that only one transaction log will be loaded. load_all is bit, with a default of one (1).

[@file_retention_period =] file_retention_period

Is the length of time in minutes in which the transaction log files are stored on the secondary server before deletion. file_retention_period is int, with a default of 2,880 minutes (two days).

[@copy_enabled =] copy_enabled

Specifies whether a copy should be performed. The value of one (1) means that a copy should be performed; zero (0) means no copy is made. copy_enabled is bit.

[@load_enabled =] load_enabled

Specifies whether a load should be performed. The value of one (1) means that a load should be performed; zero (0) means no load is made. load_enabled is bit.

[@recover_db =] recover_db

Specifies the state of the database. The value of one (1) means restore logs with STANDBY; zero (0) means restore logs with NORECOVERY. recover_db is bit.

[@terminate_users =] terminate_users

Specifies whether the secondary server should terminate users. The value of one (1) means that users should be terminated; zero (0) means users should not be terminated. terminate_users is bit.

Return Code Values

0 (success) or 1 (failure)

Remarks

This stored procedure should be executed on the secondary server, which is the destination database.

Permissions

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

Examples

This example removes the load delay from the database "pubs_standby."

EXEC   msdb.dbo.sp_update_log_shipping_plan_database
   @destination_database = N'pubs_standby',
   @load_delay = 0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft