How to Bring Online a Warm Standby Server

  • I have a logshipping set up and everything is working fine but the question is how do i make the stand by server the primary server when the actual primary server goes down. The database on the standby server is always in a standby/single user mode. i can change it to multi user but how to change the standby mode to active mode?

  • restore database "database name" with recovery

  • This msdn article should give you all the info you need to failover.

    http://msdn.microsoft.com/en-us/library/ms191233.aspx

  • so basically i have to have a full back up file of the primary server and then preform a restore on the (logshipping server) stand by server using the "with recovery option"?

  • If you already have log shipping setup, then you just need to:

    1. Restore all the tran log backups from the primary to the secondary

    2. Backup the tran log on the primary WITH NORECOVERY

    3. Restore that tran log backup to the secondary WITH RECOVERY

    4. Point the clients to the secondary server (now the new primary)

    5. Configure log shipping back to the original primary (now the new secondary)

  • Thank you.

  • If all of the logs are already current, all you have to do is issue the command I previoulsy listed. Otherwise, you need to apply any outstanding logs and then issue the "with recovery" statement.

  • Richard Moore-400646 (11/22/2011)


    If all of the logs are already current, all you have to do is issue the command I previoulsy listed. Otherwise, you need to apply any outstanding logs and then issue the "with recovery" statement.

    This would leave the original primary still online and accessible. This could cause the databases to get out of sync. It is recommended to backup the primary tran log with NORECOVERY so that the primary database goes into an "in recovery" state leaving it inaccessible.

  • The original post asked how it would be done if the primary has gone down. If the primary is truly down or in a failed state, there isn't anyway to issue the command on the existing primary server. If you're talking about a controlled fail over test, then you are absolutely correct. That's not how the original question was phrased.

  • My apologies, I had lost track of the original post.

  • you may want to look at renaming a SQL server as well (will try and find a link somewhere) as this is part of our recovery but may not be applicable to you.

    we have over 200 apps connecting to a number of servers, so to change all the connection strings would be time consuming, so we rename the Windows host, and use sp_dropserver, sp_addserver to rename the host, change the IP address just incase some developer used the IP and not the hostname, and then restore the database with recovery to bring it online.

    http://msdn.microsoft.com/en-us/library/ms143799.aspx

Viewing 11 posts - 1 through 10 (of 10 total)

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