During Mirror Failover switch a Connection String for the application

  • Hi,

    We created a Mirror Testing enviroment with the Automatic Failover set.

    Recently we had a Maintenance on the Principal Server and had to reboot it.

    The Mirror1 failover'd to the Mirror2.

    But in order to have the Web Application up and running we had to manually enter the ConnectionStrings.xml file and change the connection to the Mirror2 Srver.

    Does anybody know the proper way of doing it so the process would be automated?

    Any help will be greatly appreciated.

    Thank you.

    Alex

  • Modify your connection string to include both the principal and mirror servers. You can start here for for help:

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

  • Thank you so much Lynn.

    It worked. I really appreciate your help.

    Alex

  • Your welcome.

    Now, keep this in mind. With the release of SQL Server 2012, Database Mirroring as implemented in SQL Server 2005/2008 has been depreciated. I would highly recommend reading about Always On in SQL Server 2012. It simplifies how an application connects to an Always On "Mirror". You won't need to do what you did for SQL Server 2008 Mirroring.

    From what I have read and heard, this new feature is very flexible and provides a unique HA/DR environment.

    You may not need this now, but when the time comes to upgrade it would be good to know.

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

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