17.5. Mirroring Multiple Databases

You can mirror multiple databases on the same server, as discussed earlier. You can either use the same server for a mirror partner or use a different mirror server for each database. I recommend using the same mirror server for mirroring multiple databases from a principal server. That way, maintenance is reduced, and the system is less complex; otherwise, you have to perform all the steps mentioned in "Hardware, Software, and Server Configuration" on each mirror server.

If you want to use the database mirroring feature with database dependencies, especially with high-safety and automatic failover, you have to be careful when you design your application. Consider a scenario in which your application is using two databases, DB1 and DB2, on a server called ServerA. Now you have set up database mirroring for both of these databases to your mirror server, ServerB, with automatic failover. Suppose a failover occurs with only DB1 (perhaps because of a disk failure on the disk where DB1 resides or a sporadic network issue that could cause the mirroring session of one database to time out); and because of the automatic failover, the database fails over to the mirror ServerB. Therefore, ServerB will be the principal for database DB1, and ServerA the principal for database DB2. Where would your application connect? Even though both databases are available, your application may not function correctly. This could also happen if you manually failover one ...

Get Professional Microsoft® SQL Server® 2008 Administration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.