We are trying to specify the partner failover when making connections via Linux ODBC driver for SQL Server. Do you know a way to specify partner failover in the DSN entry in odbc.ini?
We are using Linux ODBC driver for SQL Server and unixODBC DriverManager.
Our DSN is:
Driver=ODBC Driver 11 for SQL Server
I also tried to use the following connection string in Python (via pyodbc) bypassing the DSN and connecting using the server name.
cnxn = pyodbc.connect("Server=server1,<port>;UID=sa;PWD=<pwd>;Driver=ODBC Driver 11 for SQL Server;Failover_Partner=Server2,<port2>;Database=MyDB")
If the standby DB is on server1 connection fails. It doesn't try server2. If the DB is principal on server1 connection succeeds.
Moved byKalman TothTuesday, June 17, 2014 6:46 PMNot T-SQL
Did you use ODBC Driver for SQL Server to connect to database that uses database mirroring?
the BOL,it does not list "Failover_Partner" as ODBC Driver for Linux connection string keywords.
But ODBC driver for Linux supports
AlwaysOn Availability Groups or Failover Cluster Instance by specify MultiSubnetFailover=True when connecting to a SQL Server 2012 availability group listener or SQL Server 2012 Failover Cluster Instance.