DB auto failover in c# does not work when the principal server physically goes offline
Posted
by
user62521
on Server Fault
See other posts from Server Fault
or by user62521
Published on 2011-03-20T18:40:11Z
Indexed on
2011/03/20
19:23 UTC
Read the original article
Hit count: 274
I'm setting up DB auto failover in C# with SQL Server 2008 and I have a 'high safety with automatic failover mirror' using a witness setup and my connection string looks like
"Server=tcp:DC01; Failover Partner=tcp:DC02; database=dbname; uid=sewebsite;pwd=somerndpwd;Connect Timeout=10;Pooling=True;"
During testing, when I turn off the SQL Server service on the principal server the auto failover works like a charm, but if I take the principal server offline (by shutting down the server or killing the network card) auto failover does not work and my website just times out.
I found this article where the second last post suggests that its because we are using named pipes which does not work when the principal goes offline, but we force TCP in our connection string.
What am I missing to get this DB auto failover working?
© Server Fault or respective owner