User's Guide
PART 4. Database Administration and Advanced Use
CHAPTER 26. Client/Server Communications
Properly configured Adaptive Server Anywhere servers run under the following networks and protocols:
Windows NT and Windows 95 NetBIOS, TCP/IP, or IPX protocols.
NetWare All Novell networks using the IPX or TCP/IP protocols.
UNIX TCP/IP protocol.
OS/2 NetBIOS, TCP/IP, or IPX protocols.
QNX QNX messages or the TCP/IP protocol.
In addition, two protocols are provided for communication from a client application running on the same machine but built for a different operating system.
OS/2 and Windows NT Named Pipes is used to communicate with Windows 3.x client applications running on the same machine as the server. Named Pipes are not used for network communications.
Windows 95 DDE is used to communicate with a Windows 3.x client application running on the same computer. This protocol is not used for network communications.
The client library for each platform supports the same protocols as the corresponding server. In order for Adaptive Server Anywhere to run properly, the protocol stack on the client and server computers must be compatible at each layer.
TCP/IP is a suite of protocols originally implemented by the University of California at Berkeley for BSD UNIX. TCP/IP is gaining widespread use with the expansion of the Internet and the World-Wide Web. Different TCP/IP implementations rely on particular data link drivers in order to work correctly. For example, TCP/IP for OS/2 relies on NDIS drivers as the data link protocol, whereas TCP/IP for NetWare relies on ODI drivers.
Unlike NetBEUI and IPX, the TCP/IP protocol is not associated with any specific software vendor. There are many implementations of TCP/IP available from different vendors, and many different programming interfaces to TCP. Consequently, Adaptive Server Anywhere supports only certain TCP/IP implementations on each platform. For details, see the subsections below for each platform. Because all TCP/IP implementations do implement the same protocol suite, they are all compatible.
UDP is a transport layer protocol that sits on top of IP. Adaptive Server Anywhere uses UDP on top of IP to do initial server name resolution and TCP for connection and communication after that, while SA used UDP for everything.
The TCP/IP implementation for Windows 95 and Windows NT is written to the Winsock 1.1 standard. Your TCP/IP software must support this standard.
Windows 95, Windows NT 3.5 and later ship with TCP/IP software that uses NDIS network drivers. Install TCP/IP Protocol from the Windows NT Control Panel, Network Settings.
This software allows a database server for Windows NT or a client application to use Windows NT TCP/IP.
The UNIX database server supports TCP/IP. This enables non-UNIX clients to communicate with a UNIX database server.
For performance reasons, you should consider running the Socket process on each QNX node using the TCP/IP link.
The TCP/IP implementation for OS/2 is written to the IBM TCP/IP for OS/2 2.0 specification. In order to use TCP/IP under OS/2, you need to obtain compatible TCP/IP software from a TCP/IP vendor or obtain the TCP/IP for OS/2 Base Kit from IBM.
Generally, TCP/IP software for OS/2 uses NDIS drivers. If you are running Novell NetWare in addition to TCP/IP, you will need a translation driver to ensure that both NDIS-based and ODI-based network protocols can run, as discussed in Working with multiple protocol stacks.
The TCP/IP implementation for Windows 3.x is written to the Winsock 1.1 standard. Your TCP/IP software must support this standard.
In order to use TCP/IP under Windows 3.x, or under Windows for Workgroups, you need to obtain TCP/IP software that conforms to the Winsock 1.1 standard from a TCP/IP vendor, or obtain Microsoft TCP/IP from Microsoft.
Generally, TCP/IP software for Windows uses NDIS drivers If you are running Novell NetWare in addition to TCP/IP, you will need a translation driver to ensure that both NDIS-based and ODI-based network protocols can run, as discussed in Working with multiple protocol stacks. Windows for Workgroups comes with the odihlp translation driver.
Although the default packet size for TCP/IP is 512 bytes, a larger packet size may improve query response time, especially for queries transferring a large amount of data between a client and a server process. You can set the packet size using the -p parameter on the database server command line, or by setting the CommBufferSize connection parameter in your connection profile.
For information on the database server command line, see The database server. For information on CommBufferSize, see CommBufferSize connection parameter.
IPX is a network level protocol from Novell. Adaptive Server Anywhere for NetWare, Windows NT, Windows 95, Windows 3.x, and OS/2 can all employ the IPX protocol. This section provides some tips for using IPX under different operating systems.
Some machines can use the NetWare bindery. These machines are NetWare servers or Windows NT or Windows 95 machine where the Client Service for NetWare is installed. A client application on one of these machines does not need to use broadcasts to connect to the server, if the server to which it is connecting is also using the bindery.
Applications and servers running on machines not using the bindery must connect using either of the following:
An explicit address You can specify an explicit address using the HOST communication parameter.
For more information, see HOST parameter.
Broadcast You can broadcast over a network by specifying the DOBROADCAST communication parameter.
For more information, see DOBROADCAST parameter.
Windows NT 3.5 ships with IPX network software that uses NDIS network drivers. This software can be installed from the Windows NT Control Panel, Network Settings. This software allows a Windows NT database server or a client application to use Windows NT IPX running on NDIS, while also allowing access to a NetWare file server, even though the NetWare file server will generally be using an ODI driver.
You must install both NWLink IPX/SPX Compatible Transport and Client Service for NetWare to use this feature. In some environments, problems have been found when the default setting (Auto-detect) has been chosen for the frame type. In this case, the frame type settings for the client and the server should be the same.
The IPX/SPX network protocol is the default network installed by Windows 95. If you installed Windows 95 without network support, you can install it later from the Control Panel, Network Settings.
IPX support for Windows 3.1 is generally associated with Novell NetWare. You must have the Novell support for Windows 3.1 installed and have Windows or WIN-OS/2 set up for Novell NetWare. This setup is done by the Novell NetWare requestor installation, and places three drivers into your system.ini: vipx.386, vnetware.386, and netware.drv. Many network adapters require an
EMMExclude=XXXX-YYYY
line in the system.ini file that excludes memory used by the network adapter.
The Adaptive Server Anywhere installation installs two Novell dynamic link libraries (DLLs): nwcalls.dll and nwipxspx.dll. You should check to see that there is not an older version of any DLLs in the Windows system directory or in the PATH before the Adaptive Server Anywhere directory.
For information about using IPX in a WIN-OS/2 session, see Using IPX with OS/2.
Windows for Workgroups comes with NetBEUI as its default transport protocol. Microsoft NetBEUI employs a NetBIOS interface.
You can use both NetBEUI-based Windows for Workgroups network software and IPX-based Novell network software on a single network adapter board by installing NetWare support as an additional network.
Installing NetWare support allows a client application to use an NDIS-based protocol stack while also allowing access to a NetWare file server, even though the NetWare file server will generally be using an ODI driver. Installation is carried out using the Network Setup utility in the Network Program Manager group. See networks.wri in your Windows for Workgroups directory for details on installing NetWare support. You can view or print the file with the Write accessory in the Accessories Program Manager group.
Windows for Workgroups can also support IPX communication even when the machine is not configured as a NetWare client, through the IPX/SPX Compatible Transport that comes with Windows for Workgroups. IPX/SPX Compatible Transport is installed by default on machines with enough memory. A Windows for Workgroups client can then communicate with Adaptive Server Anywhere using the NetBIOS protocol or IPX protocol.
IPX/SPX Compatible Transport is only necessary when Windows for Workgroups is not configured for NetWare and you would like a client application to communicate with a database server using IPX.
If you are using Novell's Workstation for OS/2 and you wish to use the IPX protocol from a DOS or WIN-OS/2 session, you must have Novell network access from Virtual DOS and Windows installed (VIPX.SYS and VSHELL.SYS). You must run the correct version of NETX or use GLOBAL NetWare resources in order to use IPX from a DOS or WIN-OS/2 session. For details, see your Novell Workstation for OS/2 documentation.
You must use WIN-OS/2 in standard mode, not enhanced mode, for the Novell IPX driver to work properly. You must run the task-switched buffer management program (TBMI2) before running WIN-OS/2. Adding a line to the autoexec.bat of your WIN-OS/2 session is a convenient way of doing this.
IPX parameters are found in the Protocol IPXODI section of your net.cfg file. The Novell IPX driver has only one parameter that affects performance:
IPX PACKET SIZE LIMIT The IPX PACKET SIZE LIMIT is usually 576. The default maximum packet size is 512 bytes plus 30 bytes for IPX addresses.
If you are fetching long records in your multi-user system, you may want to increase the IPX packet size and specify the new packet size less 30 bytes as the packet size parameter (-p) on the server command lines.
NetBIOS is an interface for interprocess communications, not a protocol specification. Programs written to the NetBIOS interface should operate over a variety of protocol stacks. For instance, implementations of the NetBIOS interface exist for OS/2 using TCP/IP—that is, TCP/IP is used as the communication mechanism for the NetBIOS interface for the OS/2 operating system.
Protocol stacks that implement the NetBIOS interface must be compatible between client and server machines. For instance, a NetBIOS interface using SPX/IPX as the communication mechanism is incompatible with another NetBIOS implementation using NetBEUI.
As Windows 95, Windows for Workgroups and IBM networking software all use NetBIOS with NetBEUI as a standard protocol, configuration of the NetBIOS protocol stack for these environments is carried out by the network software installation.
If you are using IBM's Network Transport Services/2 or LAN Server requestors, you must have the OS/2 LAN Virtual Device Driver installed in order to use NetBIOS from WIN-OS/2 session. The LAN VDD is documented in the NTS/2 documentation. Add the following lines to your config.sys file:
DEVICE=C:\IBMCOM\PROTOCOL\LANVDD\OS2 DEVICE=C:\IBMCOM\PROTOCOL\LANPDD\OS2
Windows NT 3.5 and later ships with NetBIOS interfaces to a number of different protocol stacks (NetBEUI, NetWare IPX/SPX transport, TCP/IP) that use NDIS network drivers. To use NetBIOS, install NetBIOS Interface from the Windows NT Control Panel, Network Settings.
Adaptive Server Anywhere works with any of these protocol stacks, but you must be sure to use compatible protocol stacks on the client and server sides of the communication.
You can have more than one NetBIOS interface active at one time. Each interface appears to as a different LAN adapter number. Adaptive Server Anywhere can simultaneously use different LAN adapter numbers, and so can simultaneously communicate on multiple NetBIOS interface protocol stacks.
Named pipes are a facility for interprocess communication. Named pipes can be used for communication between processes on the same computer or on different computers.
Adaptive Server Anywhere for Windows NT and for OS/2 use local named pipes. This allows Windows 3.x applications running on Windows NT or on OS/2 to communicate with a database server on the same machine.
Adaptive Server Anywhere does not use named pipes for client/server communications between different machines. You do not need to install remote named pipe support for local named pipes to work.
QNX messages is the native QNX network protocol. You can use QNX messages to communicate between a client application and a QNX database server.
By default, both server and client start all available protocols when they start up. If you are using QNX messages only, you may wish to disable the TCP/IP protocol on your client and server command lines.
If you experience lengthy delays when an application is first connecting to the database, it may be due to the client trying to start the TCP/IP link to the database. You can prevent the client from starting the TCP/IP link in the following ways:
Set the SQLCLIENT environment variable. For example:
export SQLCLIENT="dbclient -x qnx"
If you have the source code for the application, you can achieve the same effect by calling the db_client_start_line function in the database library. For example:
db_client_start_line( "dbclient -x QNX" );
You can prevent the server from starting the TCP/IP link by using the -x switch on the server command line. For example:
dbsrv6 -x qnx -n dbname asademo.db