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

    Question

  • 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:

    [MyDSN]
    Driver=ODBC Driver 11 for SQL Server
    Description=MyDSN
    Server=MySERVER,<port>
    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,
     Liviu


    LLL

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

Answers