Getting a Secondary LogShipdatabase out of Read Only Mode

  • All

    I have a complete failover system with 30 production databases shiped to a secondary site.  The databases are all in read only mode. 

    I would like to detach/reattach or backup/restore the databases to another instance at my failover facility. 

    Is there anyway to get a copy of the database in its present state without having to restore the transactions logs and break the log shipping?

    Thanks in Advance

    Eric 

  • If you need to get your secondary databases online, then you will break log shipping. There is no need to run any log restores on your secondary databases.

    You could just run:

    restore database <databasename> with recovery.

    This will bring your database online to the point till your last log backups have been applied by the log shipping monitor.

     

     

  • I believe you can stop sql server to on secondary server and copy the .ldf and .mdf files to the other location and restart the sql services...

    I think your dbs should come back as read only mode...

     

    MohammedU
    Microsoft SQL Server MVP

  • I have tried stopping the server and taking the database offline so I can copy the database files. 

    The new attach of the database says the database cannot be used because it is in recovery mode.

      

  • Why and how do you need to take the db offline when sql server is stopped.

    Is your dbs in standby mode or loading mode?

    MohammedU
    Microsoft SQL Server MVP

  • I take the database offline when I want to copy the file and have the rest of my SQL Server functional.  I have also detached the database and Shut down the entire SQL Server before the copy of the data/log files.  

    The failover databases are all in Standby/read-only mode.   

  • If you have a copy of a log-shipped secondary database that you want to make writable, use RESTORE..WITH RECOVERY.

    RESTORE DATABASE database WITH RECOVERY

Viewing 7 posts - 1 through 6 (of 6 total)

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