<docbook><section><title>ConfigureSQL2000MultipleInstancesSTUnix</title><para> </para><bridgehead class="http://www.w3.org/1999/xhtml:h2">Single Driver Connectivity to Multiple Instances  </bridgehead>
<para> </para><bridgehead class="http://www.w3.org/1999/xhtml:h3">Single-Tier Drivers on Unix Client to SQL Server 2000</bridgehead>
<para> Use the following instructions to connect to SQL Server DBMSs that host multiple SQL Server instances:</para><para>1.
 Use the following steps to identify your instance names --</para><itemizedlist mark="bullet" spacing="compact"><listitem> <ulink url="HowDoIFindMySQLServerInstanceName">Microsoft SQL Server instance name</ulink></listitem>
</itemizedlist><para>Microsoft SQL Server instance names should be immediately visible.
 Example: SQLSERV1, SQLSERV2.</para><para>2.
 Login to the machine that hosts your OpenLink Single-Tier driver.</para><para>3.
 cd into the root of the OpenLink installation.</para><para>4.
 Use the bash or sh command to open a bash or bourne shell.</para><para>5.
 Execute this command:</para><programlisting>. ./openlink.sh
</programlisting><para> 6.
 cd into the bin sub-directory of OpenLink.</para><para>7.
 vi the openlink.ini file.</para><para>8.
 Locate the <computeroutput>[Server Types]</computeroutput> section.</para><para>9.
 Create a meaningful label for each of your SQL Server instances.
 For example:</para><programlisting>[Server Types]
DB2             =
Informix 5      =
Informix 6      =
.
.
.
Server 1        =
Server 2        =
</programlisting><para> 10.
 Locate this stanza in the file --</para><programlisting>[Environment SQLServer 2000]
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
</programlisting><para> 11.
 Copy and paste this stanza once for each new SQL Server instance that you want to add.</para><para>12.
 Make the following modifications to the new stanzas --</para><para>a) Modify <computeroutput>[Environment SQLServer 2000]</computeroutput> so that &quot;SQL Server 2000&quot; is replaced with one of the labels you created above;e.g., <computeroutput>[Environment Server 1]</computeroutput>.</para><para>b) Pass the desired instance name to DSQUERY.
 For example <computeroutput>DSQUERY=SQLSERV1</computeroutput>.</para><para>c) Pass the hostname or IP address of the SQL Server instance to TDSHOST.</para><para>d) Pass the tcp port associated with the instance to TDSPORT.</para><para>e) Set TDSVER to 8.0, if any other value appears.</para><para>f) Ensure you have an end result similar to this --</para><programlisting>[Environment Server 1]
FREETDSCONF        = /usr/openlink/bin/freetds.conf
DSQUERY            = SQLSERV1  ; Load this section from freetds.conf
TDSHOST            = 192.158.12.121        
TDSPORT            = 1433
TDSVER             = 8.0
SQLSERVER_CATALOG  = Y
CURSOR_SENSITIVITY = LOW        ; Set to HIGH after loading oplrvc.sql

[Environment Server 2]
FREETDSCONF        = /usr/openlink/bin/freetds.conf
DSQUERY            = SQLSERV2  
TDSHOST            = 192.158.12.121        
TDSPORT            = 1434
TDSVER             = 8.0
SQLSERVER_CATALOG  = Y
CURSOR_SENSITIVITY = LOW        ; Set to HIGH after loading oplrvc.sql
</programlisting><para> 13.
 Save your changes and exit the file.</para><para>14.
 vi freetds.conf.</para><para>15.
 Make one new entry per each SQL Server instance using these conventions --</para><programlisting>[&lt;Instance Name&gt;]
host                    = &lt;ntmachine.domain.com&gt;
port                    = &lt;port&gt;
tds version             = 8.0
try server logins       = yes
</programlisting><para> For example --</para><programlisting>[SQLSERVER1]
host                    = 192.158.12.121    
port                    = 1433
tds version             = 8.0
try server logins       = yes


[SQLSERV2]
host                    = 192.158.12.121    
port                    = 1434
tds version             = 8.0
try server logins       = yes
</programlisting><para> 16.
 Save your changes and exit the file.</para><para>17.
 vi odbc.ini.</para><para>18.
 Proceed to create your DSNs as per usual.
 However, pass the appropriate label from the <computeroutput>[Server Types]</computeroutput> section of openlink.ini.
 For example --</para><programlisting>[Development DSN]
Driver          = /usr/openlink/lib/sql_mt_lt.so
ServerType      = Server 1
Username        = sa
Password        = sa
Database        = Northwind
Options         = -H 192.158.12.121 -P 1433 -V 8.0
FetchBufferSize = 99
ReadOnly        = no
DeferLongFetch  = no
JetFix          = no
Description     = Sample SQLServer 2000 Lite Connection

[Production DSN]
Driver          = /usr/openlink/lib/sql_mt_lt.so
ServerType      = Server 2
Username        = sa
Password        = sa
Database        = pubs
Options         = -H 192.158.12.121 -P 1434 -V 8.0
FetchBufferSize = 99
ReadOnly        = no
DeferLongFetch  = no
JetFix          = no
Description     = Sample SQLServer 2000 Lite Connection
</programlisting><para> 19 Save your changes and exit the file.</para><para>20.
 Test.
</para></section></docbook>