Monday, December 5, 2016

MSSQL Mirroring. Useful notes.


The mirror server instance is not caught up to the recent changes to database:


http://www.sqlfingers.com/2016/06/msg-1422-mirror-server-instance-is-not.html

Database 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.
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.


Models:

https://msdn.microsoft.com/en-us/library/ms189852(v=sql.100).aspx


How to: Minimize Downtime for Mirrored Databases When Upgrading Server Instances

https://msdn.microsoft.com/en-us/library/bb677181(v=sql.100).aspx

How to: Manually Fail Over a Database Mirroring Session (SQL Server Management Studio)



No comments: