In SQL Server 2005, if you connect to a database that is being mirrored with ADO.NET or the native SQL Server client, your application can take advantage of the drivers’ ability to automatically redirect connections when a database mirroring failover occurs. In order to do this you must specify the initial principal server and database in the connection string and optionally the failover partner server.

Connection String:

Data Source=ServerA;Failover Partner=ServerB; Initial                                Catalog=AdventureWorks;Integrated Security=True;”    


From a database mirroring and ADO.NET perspective, the failover partner in the connection string is used as an alternate SQL Server if the initial connection to the principal SQL Server fails. If the initial connection to the principal SQL Server succeeds, then the failover SQL Server parameter will not be used. If not, then the failover partner should accept the connection and your users should be able to use the application as expected.


Many applications use of multiple databases on a single server. Or one application may reference multiple databases. However, database mirroring works with a single database at a time. As such, you need to take this into account when designing mirroring into your database architecture.