I've never used mirroring, clustering or other failover techniques. But am investigating how easy it is to adapt my DAL so that SQLNativeClient transparent client redirect will work for us if my customers decide to use mirroring with or without a Witness.
Can someone explain the pragmatic process for a client application that might sit on hundreds of desktops that will connect to an instance which is mirrored and may failover?
I'm thinking of a zero maintenance approach here for those 100 desktop machines. My current thoughts are that if the process of discovery isn't automatic, that I would have to have an internet/intranet file/service that described which server was the principal and which was the mirror, which applications could read from.
Background: I have read the multiple articles, relating to using SQL_COPT_SS_FAILOVER_PARTNER connection attribute, and that you have to specify the mirror in the connection string to alllow SQLNCLI Transparent Client Redirect, but this all seems a bit back to front. Why does the programmer or end user have to get involved? The network infrastructure could change.
I would hope that an attempted connect to either the principal OR mirror OR witness would re-route me to the correct principal and just 'know' what the mirror was. I understand a witness can manage multiple Database Mirroring Sessions, so something else might be needed.
So, how do I discover the mirror or principle server to start off with? I don't want the user to enter it, as it could change. Do I have to connect first to the running principal, extract the registered mirror from the principal, and then reconnect using those parameters, or can I set the connection attirbute later?
I look forward to some enlightenment!