How do you change the Subscriber's mode from 'RESTORING' to 'STAND-BY' and vice versa?
The following are the steps used to change the mode of the subscriber database:
1 - Information on the mode is stored in the log_shipping_secondary_databases table under the msdb database. Run the following query to view their table:
Use msdb
go
select secondary_database, restore_mode from log_shipping_secondary_databases
go
In my example below I have three rows returned:
Use msdb
go
select secondary_database, restore_mode from log_shipping_secondary_databases
go
Results:
secondary_database restore_mode
-------------------------------------------------------------------------------------------------------------------------------- ------------
loga 1
ray3a 1
ray4a 0
(3 row(s) affected)
2 - Modify the restore_mode column within the table.
In the example below, I will change the mode on the 'ray4' database from 'RESTORING' to 'STAND-BY':
Use msdb
go
update log_shipping_secondary_databases
set restore_mode = 1 where secondary_database = 'ray4a'
go
Results:
(1 row(s) affected)
0 means the database will be in a 'RESTORING' state
1 means the database will be in a 'STAND-BY' state
3 - Query the table again to confirm the change:
Use msdb
go
select secondary_database, restore_mode from log_shipping_secondary_databases
go
Results:
secondary_database restore_mode
-------------------------------------------------------------------------------------------------------------------------------- ------------
loga 1
ray3a 1
ray4a 1
(3 row(s) affected)
4- In the SSMS under the SQL Server Agent|jobs folder, located the LiteSpeed Log Shipping Backup job and start it manually.
5 - Afterwards in the same folder, located the LiteSpeed Log Shipping Restore job and start this manually.
6 - Refresh the database tree. The mode should show the change
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center