vendredi 6 mars 2015

Data Source in a connection-string for connecting to SQL Server in Always On Availability configuration



I am writing a custom web-part in SP 2013 environment. We have 3 SQL 2012 servers in Always On Availability group. Where one is Primary and other two are secondary. They are configured for failover scenarios.


While preparing connection-string for my code to connect to the database, i am not sure about what to provide for the Data Source portion of the connection-string. Please help me out to decide which among the following is the best to use, to avoid any issues in future.



  1. Server Name of the primary server.

  2. SQL Server group name.

  3. Availability group listener name.


I already understand that the first option Server Name, is not a good option in this configuration. As, it may change in a failover scenario.








0 commentaires:

Enregistrer un commentaire