SQLNCLI OLEDBDatabase mirroring

If you connect with ADO.NET or the SQL Native Client to a database that is being mirrored, your application can take advantage of the drivers ability to automatically redirect connections when a database mirroring failover occurs. You must specify the initial principal server and database in the connection string and the failover partner server.

Provider=SQLNCLI;Data Source=myServerAddress;
Failover Partner
=myMirrorServerAddress;Initial Catalog=myDataBase;
Integrated Security
=True;

There is ofcourse many other ways to write the connection string using database mirroring, this is just one example pointing out the failover functionality. You can combine this with the other connection strings options available.

Connecting

This connection string (Database mirroring using SQLNCLI OLEDB) can be used for connections to SQL Server 2005.

Articlesread all »

Not the right connection string for you?

Start over in the connection string reference index.

You can also get help in the Q&A forums where you can ask your own question.

The kb articles contains how-tos and instructions and you can search for anything if you're not sure were to look.