SQL Server 2005 Tidbit 012

Manly SQL DBA

An even dozen Tidbits.

Credit for this one goes to my friend and teammate Matt Hester...

 

Q: In Mirroring with automatic failover, how do the SQL Client applications fail over when the mirror fails?

A: It really depends on the client application and how it was written.  Client applications written using ADO.NET 2.0 will automatically fail over when the database fails over.  However other clients will have to manually fail over.  Basically the new SNAC (SQL Native Access Client) has information about the mirror, and about where to connect if the principle connection goes down.  If the principle drops, the application will try the mirror.  If a failover has occurred, then the mirror is able to respond and all is good.  If the mirror drops (or doesn’t answer at all), the app will then again try the original principle, and so on.

Mirroring has always generated some great questions.  John Baker has a great post on mirroring.

Got an IT question?  Give me a comment, or contact me.