3 4
The SQL Server net-library layer translates API calls into protocol-specific calls and then passes them down to the network protocol layer. You manage the net-library layer on your client systems by using the Client Network Utility and on your server by using the Server Network Utility. These utilities enable you to add or remove net-libraries on both the server and each client system. The net-library or net-libraries enabled on the client systems must be available on the server for SQL Server communication to occur. A single network can accommodate several protocols at one time. For example, a set of client systems can communicate to SQL Server via named pipes, while on the same network other clients can communicate to SQL Server via TCP/IP.
It is common to configure several protocols on the server system. By default, the named pipes and TCP/IP net-libraries are installed on the server. To configure additional net-libraries on the server, follow these steps:
Figure 11-2. The General tab of the SQL Server Network Utility dialog box.
The Network Libraries tab is for informational purposes only. From the Network Libraries tab, you can view the version numbers and the dates on which the net-libraries were most recently modified, as shown in Figure 11-3.
Figure 11-3. The Network Libraries tab of the SQL Server Network Utility dialog box.
On the other side of the network connection is the client system, which is configured in much the same way as the server system is. To configure the client system, follow these steps on the client system:
Figure 11-4. The General tab of the SQL Server Client Network Utility dialog box.
Although the SQL Server Network Utility dialog box simply lists a number of net-libraries and their connection parameters, the SQL Server Client Network Utility dialog box allows you to specify which protocols are enabled by default on the client as well as to specify server aliases. The enabled protocols are listed on the General tab in the order in which they'll be used. For example, in Figure 11-4, the enabled protocols are, in order, named pipes and TCP/IP. In our example, the client will attempt to connect to the server via named pipes first. If that is unsuccessful, the client will then attempt to connect to the server by using TCP/IP. If that fails, the client will produce a connection error message.
A server alias enables you to override the enabled-protocols list and use a specific protocol only. There will be no escalation if the connection is not successful on the specified protocol. If you have multiple servers that do not use a common protocol, you should put the most common protocol at the top of the list of enabled protocols. This will minimize the amount of potential retry time while you establish connections.
You can easily enable or disable protocols. To enable a protocol, simply select the desired protocol from the list of disabled protocols, and then click Enable. To disable a protocol, select the desired protocol from the enabled-protocols list, and then click Disable.
You can modify the properties of an enabled protocol by selecting it from the Enabled Protocols By Order list and then clicking Properties. However, the default values are optimal for almost every network.
From the General tab, you can also enable protocol encryption, which protects the data as it crosses the network. This option is available with the multiprotocol protocol only.
Figure 11-5. The Add Network Library Configuration dialog box.
These options typically do not need to be disabled. They require little overhead, and they add functionality.
Figure 11-6. The DB-Library Options tab of the SQL Server Client Network Utility dialog box.
Most connection problems arise when the net-libraries are not set in the proper order on the client system. If you are experiencing connectivity problems, check the net-library settings first.
Figure 11-7. The Network Libraries tab of the SQL Server Client Network Utility dialog box.
As mentioned earlier, SQL Server supports a number of net-libraries: named pipes, TCP/IP, multiprotocol, NWLink IPX/SPX, AppleTalk, and Banyan VINES. Each net-library corresponds to a different network protocol or set of protocols. This section provides a brief overview of each net-library.
The network protocol on which you run SQL Server will likely be determined by corporate standards or legacy systems. All SQL Server commands and functions are supported across all network protocols; however, some protocols are faster than others. In addition, some protocols support routing and name services that others do not.
Microsoft developed the named pipes protocol several years ago. Named pipes is supported in two modes: local and remote. The local named pipes protocol is used when the client and server are on the same system and remote named pipes is used when the client and server are on different systems. When a connection is established via named pipes, the SQL Server network utilities determine whether to use a local named pipe or a remote named pipe.
Named pipes is the default client protocol, and it is one of the default network protocols on Windows NT 4 Server and Windows 2000 systems. On Microsoft Windows 95 and Microsoft Windows 98 systems, named pipes is not an option. On these systems, the server-side protocols are TCP/IP, multiprotocol, and shared memory. Although named pipes is an efficient protocol, it is not usually used for large networks because it does not support routing and gateways. It is also not preferred for use with a slower network. Named pipes requires significantly more interaction between the server and the client than do other protocols, such as TCP/IP.
TCP/IP is one of the most popular network protocols because of the number of platforms on which it runs, its acceptance as a standard, and its high speed. It is also the network protocol used for the Internet. The TCP/IP net-library is one of the highest performing of the SQL Server net-libraries. TCP/IP's speed and its rich feature set make it a good choice.
The multiprotocol net-library was new with SQL Server 7 and carries over to SQL Server 2000. This net-library is actually a combination of several net-libraries. As such, it is not as efficient as a single net-library, but it offers more flexibility. The multiprotocol net-library supports the TCP/IP, NWLink IPX/SPX, and named pipes protocols. When you use the multiprotocol net-library, the first protocol that the client and server have in common is used. When a client might connect to various servers running different protocols, multiprotocol is an ideal choice.
NWLink IPX/SPX is an ideal protocol to use when you are integrating SQL Server 2000 systems into a Novell NetWare network because it performs the integration seamlessly. IPX/SPX has been around for quite a while, and it has high performance and stability.
AppleTalk is the network protocol developed by Apple Computer and used for Apple systems. Windows NT and Windows 2000 support AppleTalk, which allows Windows NT and Windows 2000 servers and clients to seamlessly integrate into an AppleTalk environment.
The Banyan VINES net-library supports systems on a VINES network. This net-library allows you to integrate Windows clients and servers into a VINES environment.
This protocol comes in two flavors, Giganet and ServerNet II. It is well suited for clustered servers.
Your choice of net-library will be based on the protocols your network is using. Connection problems usually occur when the net-libraries on the server and on the client are not in sync. If you have trouble connecting to your server, check the net-library definitions on both sides. Also, try connecting to the server using another program such as PING or Microsoft Windows Explorer to determine whether the problem is SQL Server related or is caused by the network itself.