LogShipping database to standby mode

  • Hi,

    i have configured logshipping for my databases.

    for dr testing i have disabled the lscopy,ls restore jobs on the secondary server and after that i have ran my database come to online by retsore databse mydb with recovery.

    now my database came to online.

    i am planning reconfigure the logshipping .

    how can i re configure the logshipping database and its state to standby / readonly mode.

    i have tried using the copy only backup and restored on the secondary server but my database is gone to restoring mode.

    how can i bring back to stand by mode

  • It's an option when you set up logshipping, on the Restore Transaction Log tab of Secondary Database Settings. It's shown in the 3rd screenshot down here:

    http://www.sqlshack.com/sql-server-log-shipping/

  • no my database still in restoring mode how to chnage to standby / readonly

    (i have taken full copy only backup and applied on secondary database with no recovery)

  • Sree Divya (10/13/2016)


    Hi,

    i have configured logshipping for my databases.

    for dr testing i have disabled the lscopy,ls restore jobs on the secondary server and after that i have ran my database come to online by retsore databse mydb with recovery.

    now my database came to online.

    i am planning reconfigure the logshipping .

    how can i re configure the logshipping database and its state to standby / readonly mode.

    i have tried using the copy only backup and restored on the secondary server but my database is gone to restoring mode.

    how can i bring back to stand by mode

    Can you detail the exact steps you are taking to restore the database?

    The following syntax should be of some help

    USE [master]

    --Restore to the databasename

    RESTORE DATABASE [somedb] FROM

    --select the disk location and filename

    DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Backup\MY_DBA_Utils_FULL_20161020_170000.bak' WITH

    --If you need to move any file locations then do this here

    MOVE N'DBA_Utils' TO N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\DBA_Utils2.mdf',

    MOVE N'DBA_Utils_log' TO N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\DBA_Utils2_log.ldf',

    --if no move required then just delete move commands and carry on here

    STANDBY = N'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Backup\MY_DBA_Utils_RollbackUndo_2016-10-20_17-30-00.TUF'

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply