Specifying Partner Failover in odbc.ini for Linux ODBC driver for SQL Server


  • Hi,

    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.

    Thank you,


    • Moved by Kalman Toth Tuesday, June 17, 2014 6:46 PM Not T-SQL
    Tuesday, June 17, 2014 6:09 PM