Client and Server Net-Libraries

SQL Server Architecture

SQL Server Architecture

Client and Server Net-Libraries

Microsoft® SQL Server™ 2000 uses components called client Net-Libraries to shield the OLE DB Provider for SQL Server 2000, the SQL Server 2000 ODBC driver, and the DB-Library DLL, from the details of communicating with different Interprocess Communication (IPC) components. Server Net-Libraries perform the same function for the database engine.

The following components manage communications between SQL Server 2000 and its clients in this sequence:

  1. The client application calls the OLE DB, ODBC, DB-Library, or Embedded SQL API. This causes the OLE DB provider, ODBC driver, or DB-Library DLL to be used for SQL Server communications.

  2. The OLE DB provider, ODBC driver, or DB-Library DLL calls a client Net-Library. The client Net-Library calls an IPC API.

  3. The client calls to the IPC API are transmitted to a server Net-Library by the underlying IPC. If it is a local IPC, calls are transmitted using a Windows operating IPC such as shared memory or local named pipes. If it is a network IPC, the network protocol stack on the client uses the network to communicate with the network protocol stack on the server.

  4. The server Net-Library passes the requests coming from the client to the instance of SQL Server 2000.

Replies from SQL Server 2000 to the client follow the reverse sequence.

This illustration shows the communication path when a SQL Server application runs on the same computer as an instance of SQL Server.

This is a simplified illustration of the communication path when a SQL Server application connects through a LAN or WAN to an instance of SQL Server 2000 on a separate computer. Although the illustration shows the OLE DB Provider for SQL Server 2000, SQL Server 2000 ODBC driver, and DB-Library DLL using specific Net-Libraries, there is nothing that limits these components to these Net-Libraries. The provider, driver, and DB-Library can each use any of the SQL Server Net-Libraries.

SQL Server 2000 classifies the Net-Libraries as primary or secondary Net-Libraries. The OLE DB Provider for SQL Server 2000, the SQL Server 2000 ODBC driver, the DB-Library DLL, and the database engine communicate directly with only the two primary Net-Libraries:

  • By default, local connections between an application and an instance of SQL Server 2000 on the same computer use the Shared Memory primary Net-Library. This path is shown in the illustration above.

  • Intercomputer connections communicate through the Super Socket primary Net-Library. The Super Socket Net-Library has two communication paths:
    • If you choose a TCP/IP Sockets connection or an NWLINK IPX/SPX connection, the Super Socket Net-Library directly calls the Windows Socket 2 API for the communication between the application and the instance of SQL Server 2000.

    • If a Named Pipes, Virtual Interface Architecture (VIA) SAN, Multiprotocol, AppleTalk, or Banyan VINES connection is chosen, a subcomponent of the Super Socket Net-Library, called the Net-Library router, loads the secondary Net-Library for the chosen protocol and routes all Net-Library calls to it.

This illustration shows in more detail the communication paths through the client and server Net-Libraries for network connections between a computer running the SQL Server 2000 client components and an instance of SQL Server 2000.

The server Super Socket Net-Library is implemented as Ssnetlib.dll, and the client Super Socket Net-Library is implemented as Dbnetlib.dll.

This table shows how the Net-Libraries relate to the IPC APIs and protocols used to make connections.

Protocol specified in network utilities

Client Net-Library used


Server Net-Library used

IPC API called by Net-Library

Protocols supporting the IPC API
TCP/IP Sockets Dbnetlib.dll Ssnetlib.dll Windows Socket 2 TCP/IP
Named Pipes Dbnetlib.dll routes to Dbnmpntw.dll Ssnetlib.dll routes to Ssnmpn70.dll (Microsoft Windows NT® and Windows® 2000 only) Windows Named Pipes File system (local)
TCP/IP
NetBEUI
NWLink
NWLink IPX/SPX Dbnetlib.dll Ssnetlib.dll Windows Socket 2 NWLink
VIA GigaNet SAN Dbnetlib.dll routes to Dbmsgnet.dll (Microsoft Windows NT and Windows 2000 only) Ssnetlib.dll routes to Dbmsgnet.dll (Microsoft Windows NT and Windows 2000 only) Virtual Interface Architecture (VIA) Virtual Interface Architecture (VIA)
Multiprotocol Dbnetlib.dll routes to Dbmsrpcn.dll Ssnetlib.dll routes to Ssmsrpc.dll (default instance only) Windows RPC File system (local)
TCP/IP
NetBEUI
NWLink
AppleTalk Dbnetlib.dll routes to Dbmsadsn.dll Ssnetlib.dll routes to Ssmsad70.dll (default instance only) AppleTalk ADSP AppleTalk
Banyan Vines Dbnetlib.dll routes to Dbmsvinn.dll Ssnetlib.dll routes to Ssmsvi70.dll (default instance only) Banyan VINES SPP Banyan VINES

Instances of SQL Server 2000 running on Microsoft Windows® 98 do not support the server Named Pipes and Banyan VINES Net-Libraries, because the Windows 98 operating system does not support the server part of these APIs. SQL Server 2000 also does not support the server NWLink IPX/SPX Net-Library on Windows 98. SQL Server 2000 does support the client side of these Net-Libraries on Windows 98; therefore, applications running on Windows 98 can use the Net-Libraries to connect to instances of SQL Server on Microsoft Windows NT or Microsoft Windows 2000. Applications running on Windows 95 can also make connections using the client side of these Net-Libraries.

The AppleTalk Net-Library does not run on computers running Windows 95 or Windows 98.

VIA networks are designed to support the high levels of messaging traffic between servers in the same data center, such as in a Web site implemented as one or more Internet Information Services application servers connected to one or more database servers running SQL Server. VIA networks are not used to connect individual workstations. Both the client and server SQL Server VIA Net-Libraries are supported only on Windows NT Server and Advanced Server, and Windows 2000 Server, Advanced Server, and Data Center.

Named instances of SQL Server 2000 support only the Named Pipes, TCP/IP Sockets, NWLink IPX/SPX, and Shared Memory Net-Libraries. Named instances do not support the Multiprotocol, AppleTalk, or Banyan VINES Net-Libraries. To maintain compatibility with earlier versions of SQL Server, default instances support all server Net-Libraries.

Some of the Net-Libraries support only one type of protocol stack. For example, the AppleTalk Net-Library requires an AppleTalk protocol stack. Other Net-Libraries, such as the Named Pipes and Multiprotocol Net-Libraries support several protocol stacks.

The Microsoft SQL Server Net-Libraries have been tested intensively with the Microsoft protocol stacks and are supported with these stacks. Protocol stacks from other vendors should work, provided that the stacks fully support the APIs used by the Microsoft SQL Server Net-Libraries.

When the Named Pipes or Multiprotocol Net-Libraries are used to connect an application to an instance of SQL Server on the same computer, and the computer does not have a protocol stack, the IPC APIs are implemented by the file system.