http://www.sqlservercentral.com/blogs/sqldbauk/2012/05/31/how-to-give-your-net-application-ha/

Printed 2014/09/01 11:31PM

How to Give your .NET application HA

2012/05/31

By David Postlethwaite

I was at a meeting the other week when someone mentioned that you could specify two SQL Servers in a .NET connection string. I hadn’t heard of this before and did some investigation and found out a bit more.
 
In your SQL connection string you can specify a second SQL Server – a failover partner. What happens is if the primary server stops responding then your .NET application will automatically start trying to connect to the alternate SQL server.
 
This is ideal when you are using SQL mirroring, not only will the SQL server failover but your .NET application will failover as well
 
The syntax is shown below
 

ConnectionString=”ProviderName= System.Data.SqlClient; Data Source=Server1; Failover Partner= Server2; Initial Catalog=NorthWind ; Integrated Security=True;”



Copyright © 2002-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.