Beside choose "standby mode" using SSMO Transaction Log Shipping interface, below is the T-SQL way to change the secondary mode from "restoring" to "readonly".
-- The T-SQL Script tested in SQL Server 2008 R2
-- Put in to readonly mode, suggest to temporary disable the restore agent,
-- otherwise the agent will automatically put it in "restoring" mode.
RESTORE LOG [Northwind]
WITH STANDBY = N'C:\backup2\ROLLBACK_UNDO_Northwind.BAK'
GO
-- Put back into recovery mode
RESTORE LOG [Northwind] WITH NORECOVERY
GO
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment