Single Driver Connectivity to Multiple Instances

Single-Tier Drivers on Unix Client to SQL Server 2005

Use the following instructions to connect one client to multiple SQL Server instances:

  1. Identify your Microsoft SQL Server instance names
  2. Log in to the machine that hosts your OpenLink Single-Tier driver.
  3. cd into the root of the OpenLink installation.
  4. Use the bash or sh command to open a bash or bourne shell.
  5. Execute this command:


    . ./openlink.sh

  6. cd into the bin sub-directory of OpenLink.
  7. vi the openlink.ini file.
  8. Locate the [Server Types] section.
  9. Create a meaningful label for each of your SQL Server instances. For example:


    [Server Types] DB2 = Informix 5 = Informix 6 = . . . Instance1 = Instance2 =

  10. Locate this stanza in the file --


    [Environment SQLServer 2005] FREETDSCONF = /usr/openlink/bin/freetds.conf DSQUERY = SQLSERVER ; Load this section from freetds.conf TDSHOST = host.domain ; Point this to your SQLServer machine TDSPORT = 1433 TDSVER = 8.0 SQLSERVER_CATALOG = Y CURSOR_SENSITIVITY = LOW ; Set to HIGH after loading oplrvc.sql

  11. Copy and paste this stanza once for each new SQL Server instance that you want to add.
  12. Make the following modifications to the new stanzas --
    1. Modify [Environment SQLServer 2005] so that "SQL Server 2005" is replaced with one of the labels you created above;e.g., [Environment Instance1].
    2. Pass the hostname or IP address of the SQL Server instance to TDSHOST.
    3. Pass the tcp port associated with the instance to TDSPORT.
    4. Set TDSVER to 9.0 for SQL Server 2005.
    5. Ensure you have an end result similar to this --


      [Environment Server 1] FREETDSCONF = /usr/openlink/bin/freetds.conf DSQUERY = SQLSERVER ; Load this section from freetds.conf TDSHOST = 192.158.12.121 TDSPORT = 1433 TDSVER = 9.0 SQLSERVER_CATALOG = Y CURSOR_SENSITIVITY = LOW ; Set to HIGH after loading oplrvc.sql [Environment Server 2] FREETDSCONF = /usr/openlink/bin/freetds.conf DSQUERY = SQLSERVER TDSHOST = 192.158.12.121 TDSPORT = 1434 TDSVER = 9.0 SQLSERVER_CATALOG = Y CURSOR_SENSITIVITY = LOW ; Set to HIGH after loading oplrvc.sql

  13. Save your changes and exit the file.
  14. vi odbc.ini.
  15. Proceed to create your DSNs as per usual. However, pass the appropriate label from the [Server Types] section of openlink.ini. For example --


    [Development DSN] Driver = /usr/openlink/lib/sql_mt_lt.so ServerType = Instance1 Username = sa ;Password = Database = Northwind Options = -H 192.158.12.121 -P 1433 -V 9.0 FetchBufferSize = 99 ReadOnly = no DeferLongFetch = no JetFix = no Description = connection to Instance1 [Production DSN] Driver = /usr/openlink/lib/sql_mt_lt.so ServerType = Instance2 Username = sa ;Password = Database = pubs Options = -H 192.158.12.121 -P 1434 -V 9.0 FetchBufferSize = 99 ReadOnly = no DeferLongFetch = no JetFix = no Description = connection to Instance2

  16. Save your changes and exit the file.
  17. Test.

Referenced by...