%META:TOPICPARENT{name="ConfigureSQLMultipleInstances"}% ==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: # [[HowDoIFindMySQLServerInstanceName|Identify your Microsoft SQL Server instance names]] # Log in to the machine that hosts your OpenLink Single-Tier driver. # {{{cd}}} into the root of the OpenLink installation. # Use the {{{bash}}} or {{{sh}}} command to open a bash or bourne shell. # Execute this command: {{{ . ./openlink.sh }}} # cd into the bin sub-directory of OpenLink. # vi the openlink.ini file. # Locate the {{{[Server Types]}}} section. # Create a meaningful label for each of your SQL Server instances. For example: {{{ [Server Types] DB2 = Informix 5 = Informix 6 = . . . Instance1 = Instance2 = }}} # 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 }}} # Copy and paste this stanza once for each new SQL Server instance that you want to add. # Make the following modifications to the new stanzas -- ## Modify {{{[Environment SQLServer 2005]}}} so that "{{{SQL Server 2005}}}" is replaced with one of the labels you created above;e.g., {{{[Environment Instance1]}}}. ## Pass the hostname or IP address of the SQL Server instance to {{{TDSHOST}}}. ## Pass the tcp port associated with the instance to {{{TDSPORT}}}. ## Set {{{TDSVER}}} to {{{9.0}}} for SQL Server 2005. ## 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 }}} # Save your changes and exit the file. # vi odbc.ini. # 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 }}} # Save your changes and exit the file. # Test.