The SQL Server Client Architecture

Microsoft SQL Server 2000 supports several methods for connecting client computers to a server instance. The means for connecting the computers and the software involved depends heavily on the type of client, where the client is located, and the network infrastructure that is in place.

For SQL Server 2000, several common types of clients connect to the database server. Clients, in this case, are software applications that usually fall into one of these categories:

  • OLE DB consumers?These applications use one of two OLE DB providers offered by Microsoft to connect to SQL Server. The OLE DB provider for SQL Server is the recommended choice because it has been optimized for SQL Server, but the OLE DB provider for ODBC can also be used.

  • ODBC Applications?Applications that rely on the open architecture of ODBC. This is an industry standard that is utilized by some of the SQL Server client tools, including Enterprise Manager and SQL Query Analyzer.

  • DB-Library Applications?DB-Library is the original Application Programming Interface (API) used to connect to SQL Server. Applications that are utilizing DB-Library are typically older applications and include the ISQL command-line utility that comes with SQL Server 2000.

For these clients to connect to an instance of SQL Server 2000, they must use a client Net-Library that matches one of the server Net-Libraries that is listening for requests. The Net-Library is a dynamic-link library (DLL) that handles the communication between the client application and a network protocol. Each network protocol has a corresponding Inter-process Communication Component (IPC) API with which the Net-Library communicates.

Figure 9.1 illustrates the key components involved in the communication between the client and the server. The communication sequence from the client to the server is as follows:

  1. The client application calls the OLE DB, ODBC, DB-Library, or Embedded SQL API.

  2. The client API then calls a client Net-Library.

  3. The client Net-Library calls an IPC API.

  4. The IPC API transmits the client calls to a server Net-Library. If the client application is located on the database server, then the calls are transmitted using Windows IPC components, such as local named pipes or shared memory. If the client application is not on the server, then the network protocol stack on the client is used to communicate with the network protocol stack on the server.

  5. The server Net-Library communicates with the desired instance of SQL Server 2000.

Figure 9.1. IPC communication architecture.


This communication scheme is fairly straightforward, but it can be complicated by the fact that some network APIs can be used over many different network protocols. Each of the Net-Libraries and the protocols they support will be addressed in more detail in the "Network Protocol Support" section later in this chapter.

    Part III: SQL Server Administration
    Part IV: Transact-SQL
    Part V: SQL Server Internals and Performance Tuning
    Part VI: Additional SQL Server Features