How to troubleshoot connectivity issues in SQL Server 2000
Chris Tull, Microsoft Help and Support
This article can help you to resolve connectivity problems with Microsoft SQL Server 2000. This article contains descriptions of common connectivity problems and the steps that you can take to help resolve your connectivity problems.
SQL Server 2000 supports several methods of communication between the instance of SQL Server and the client applications. If your client application and the instance of SQL Server reside on the same computer, Microsoft Windows interprocess communication (IPC) components, such as local named pipes or the Shared Memory protocol, are used to communicate. However, when the client application and the instance of SQL Server reside on different computers, a network IPC, such as TCP/IP or named pipes, is used to communicate.本文来自优.文,论-文·网原文请找腾讯752018766
SQL Server 2000 uses Net-Library, a DLL, to communicate with a particular network protocol. A matching pair of Net-Libraries must be active on the client computer and the server computer to support the network protocol that you want to use. For example, if you want to enable a client application to communicate with a specific instance of SQL Server across TCP/IP, the client TCP/IP Sockets Net-Library (Dbnetlib.dll) must be configured to connect to the server on the client computer. Likewise, the server TCP/IP Sockets Net-Library (Ssnetlib.dll) must listen on the server computer. In this scenario, the TCP/IP protocol stack must be installed on both the client computer and the server computer.
After you install SQL Server 2000, you can configure the properties of the client Net-Libraries by using Client Network Utility. You can configure the properties of the server Net-Libraries by using Server Network Utility (Svrnetcn.exe). The server Net-Libraries are installed during the installation of the server tools in SQL Server Setup. However, some of the server Net-Libraries may not be active. By default, SQL Server 2000 enables and listens on TCP/IP, named pipes, and Shared Memory. Therefore, for a client to connect to a server computer, the client must connect by using a client Net-Library that matches one of the server Net-Libraries that is currently being used by the instance of SQL Server.
For additional information about SQL Server communication components and Net-Libraries, see the following topics in SQL Server Books Online: 用分页管理,使用位示图实现主存的分配与回收
• Communication Components
• Client and Server Net-Libraries
• Managing Clients
Troubleshoot connectivity issues
Most of the connectivity issues that you may notice in SQL Server 2000 occur because of problems with TCP/IP, Windows authentication, or a combination of TCP/IP and Windows authentication.
Important Before you start to troubleshoot connectivity issues in SQL Server 2000, make sure that the MSSQLServer service is started on the computer that is running SQL Server.
Verify your DNS settings
The name resolution process in Domain Name System (DNS) is used to resolve the IP address to the name of the instance of SQL Server. If the name resolution process does not work correctly, the instance of SQL Server is not reachable, and you may receive one or more of the following error messages:
SQL Server does not exist or access denied
General Network Error
Cannot Generate SSPI Context
To verify that the name resolution process is resolving the correct server, you can ping the server by using the server name and the IP address of the server. To do so, follow these steps:
1. Click Start, and then click Run.
2. In the Run dialog box, type cmd in the Open box, and then click OK.
3. At the command prompt, run the following command:
ping <Server Name>
Note the IP address that is returned.
4. At the command prompt, run the following command (where IP address is the IP address that you noted in step 3):
ping –a <IP address>
Verify that the command resolves to the correct server name. If either of the specified commands are not successful, time out, or do not return the correct values, the DNS lookup is not working correctly or the problem occurs because of other networking or routing issues. To see your current DNS settings, run the following command at a command prompt:
ipconfig /all 本文来自优.文,论-文·网原文请找腾讯32-49114
To work around this problem, add an entry for the server to the %systemroot%\system32\drivers\etc\hosts file on the client computer. You can also work around the problem by connecting to the server by using the Named Pipes Net-library.
Verify the enabled protocols and aliases
Connectivity problems may occur if the alias on the client computer is set incorrectly. You can view the aliases by using Client Network Utility. To do so, follow these steps:
1. Start Client Network Utility. If the SQL Server client tools are installed on the computer that is running the client application, follow these steps to start Client Network Utility:
a. Click Start, and then point to Programs.
b. Point to Microsoft SQL Server, and then click Client Network Utility.
If the SQL Server client tools are not installed on the client computer, follow these steps to start Client Network Utility:
a. Click Start, and then click Run.
b. In the Run dialog box, type cliconfg in the Open box, and then click OK.2615