Windows Sockets format

For the Windows Sockets protocol, the server address consists of the TCP/IP host name or IP address of the NT computer and a unique socket for the Adaptive Server, separated by a comma.

Keep the following guidelines in mind when creating the address:


Increasing Windows Sockets connections

To support more than 64511 Windows Sockets (TCP/IP) connections to Adaptive Server, you may need to use the NT Registry to increase the maximum number of sockets connections available on the server.

WARNING! Do not modify a Registry value unless you are an NT administrator and are familiar with the regedt32 utility. See your NT operating system documentation for information on using regedt32.

To modify an existing TcpNumConnections value:

  1. Log in to Windows NT using an account with NT administrator privileges.

  2. Start the regedt32 utility from the Windows NT program group.

  3. Select the Registry window HKEY_LOCAL MACHINE.

  4. Open the Registry key HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet\Services\Tcpip\Parameters.

  5. If the TcpNumConnections value exists, go to step 6.

    If the value does not exist, add and configure it by completing the steps under “To add a TcpNumConnections value.”

  6. Double-click the value.

  7. In the DWORD Editor dialog box, select the Decimal option.

  8. In the Data text box, enter the maximum number of connections to support.

  9. Click OK to return to the Registry key dialog box.

  10. If you have completed your tasks in regedt32:

    1. Select Exit from the Registry menu to quit regedt32.

    2. Restart your computer.

To add a TcpNumConnections value:

  1. Complete the Add Value dialog box as follows:

    Value Name – TcpNumConnections

    Data Type – select REG_DWORD from the drop-down list.

  2. Click OK.

  3. Complete the DWORD Editor dialog box as follows:

    Data – enter the maximum number of TCP connections for the computer.

    Radix – select the Decimal option button.

  4. Click OK.

    The utility adds the new value to the Registry key.

  5. If you have completed your tasks in regedt32:

    1. Choose Exit from the Registry menu to quit regedt32.

    2. Restart your computer.


Using multiple TCP/IP network interface cards

When client workstations use multiple TCP/IP network interface cards, the NT system administrator must edit the lmhosts file on the Windows NT server to accept connections from the clients.

To correctly enter the card information:

For example, assume that a server named BALCLUTHA has three cards. Without an lmhosts entry and separate entries in sql.ini, the server listens on socket BALCLUTHA,5000 for all three cards. To provide unique addresses, set up lmhosts as follows:

130.214.10.248    NT0
130.214.11.248    NT1
130.214.12.248    NT2

In the sql.ini file, add entries for both QUERY and MASTER:

[BALCLUTHA]                                                  
query=NT0,5000
master=NT0,5000
query=NT1,5000
master=NT1,5000
query=NT2,5000
master=NT2,5000

Controlling the connection timeout

When an isql connection remains idle for several minutes, the next query may result in this error message:

Attempt to initiate a new SQL Server operation with results pending.

This problem occurs when you use the Windows Sockets protocol, and you have a small value for NT TcpKeepTries. To correct this problem, you must increase the value in NT TcpKeepTries.

WARNING! Do not modify Registry values unless you are an NT administrator and you are familiar with the regedt32 utility. See the NT operating system documentation for information on using regedt32.

To increase the TcpKeepTries value:

  1. Start the regedt32 utility, and display the Parameters values.

  2. Double-click the TcpKeepTries value.

  3. Change the data value to at least 20, and choose OK.

  4. If you have completed your tasks in regedt32:

    1. Choose Exit from the Registry menu to quit.

    2. Reboot your computer.