Fixed the TCP/IP error of connecting to SQL Server 2000.

Source: Internet
Author: User
Tags sql server driver mssqlserver odbc sql server driver
Two days ago, I arranged for a customer to provide services. I encountered an error where ODBC could not connect to SQL Server 2000. The following error may be detected:
One possibility is the SQL bug.
The two may be the English version of the installation, which may cause problems during the localization process.
To solve this problem, follow the steps on the Microsoft Official Website:
In SQL Server 2000 custom installation, if only the TCP/IP protocol is selected and all other protocols are disabled, SQL Server may not be able to initialize and listen on TCP/IP sockets. Practical server network Program It shows that it is listening on TCP/IP port 1433, but it is not listening on this port. The client may not be connected and the following error message may occur:

Connection Failed: SQL state: '000000' SQL Server Error: 01000 [Microsoft] [odbc SQL Server Driver] [TCP/IP sockets] connectionopen (connect ()). connection Failed: SQL state: '000000' SQL Server Error: 6 [Microsoft] [odbc SQL Server Driver] [TCP/IP sockets] specified SQL Server not found. unable to connect to server 'servername': SERVER: MSG 6, level 16 State 1. [Microsoft] [odbc SQL Server Driver] [TCP/IP sockets] specified SQL Server not found. [TCP/IP sockets] specified SQL Server not found. [TCP/IP sockets] connectionopen (connect ()).

Note: In addition to this specific situation, if there are other TCP/IP connection problems, the above error message may also appear. To determine whether SQL Server is listening for TCP/IP ports, checkTcpportWhether it is incorrectly set to NULL:

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft SQL Server \ [Instance name] \ MSSQLServer \ supersocketnetlib \ Tcp \ REG_SZ tcpport =

To solve this problem, follow these steps:

    1. Start Registry Editor (regedt32.exe ).
    2. FindTcpportValue: Name instance:

      HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft SQL Server \ [InstanceName] \ MSSQLServer \ supersocketnetlib \ Tcp \ tcpport

      Default instance:

      HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ MSSQLServer \ supersocketnetlib \ Tcp \ tcpport

    3. InEditClickString. Enter one of the following values:
      1. Enter the desired port number.
        -Or-

      2. Enter 0 to enable SQL Server to dynamically detect and specify a port at the next startup.
    4. ClickOK.
    5. Exit Registry Editor.

You can also use the following method:
Uninstall the previously installed database, then install the original SQL Server2000 Database Enterprise Edition (both Chinese and English versions), and then add the SP4 upgrade package.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.