You may receive a connection error message when you try to connect to an instance of SQL Server 2000 or of SQL Server 7.0 that was installed after you installed SQL Server 2005

Article translations Article translations
Article ID: 905618 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

You may receive a connection error message if the following conditions are true:
  • You install Microsoft SQL Server 2000 or SQL Server 7.0 after you install SQL Server 2005.
  • You try to connect to an instance that was created by SQL Server 2000 or by SQL Server 7.0.
This problem occurs if the connection string does not include the protocol-specific information, even if the SQL Server Browser service is still running.

In this scenario, the protocol-specific information depends on the information that is returned by the server. For example, you may receive the following error message when you connect to an instance by using the Sqlcmd utility (Sqlcmd.exe):
SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
Sqlcmd: Error: Microsoft SQL Native Client : Client unable to establish connection.
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

CAUSE

When you try to connect to an instance of SQL Server 2000 or of SQL Server 7.0, the SQL Server Browser service (Sqlbrowser) will try to obtain the required protocol information from the Microsoft Windows registry to relay to the client. Therefore, the SQL Server Browser service must have sufficient permissions to read the appropriate Windows registry for the instance.

When you set up SQL Server 2005, the registry keys for all existing instances are modified to enable the SQL Server Browser service to read the required protocol information. However, if you install an instance of SQL Server 2000 or of SQL Server 7.0 after you set up SQL Server 2005, the correct registry permissions are not set. The permissions are only modified when the SQL Server Browser service is installed. Specifically, if the startup account of the SQL Server Browser service is not an Administrators account, this account may not have the required access permissions to read the relevant keys of the instance.

Note In SQL Server 2000, the SQL Server service identifies the server connection endpoints. SQL Server 2005 replaces that function with the SQL Server Browser service. If you install SQL Server 2005 on a computer that is also running SQL Server 2000, you must install SQL Server 2000 Service Pack 3 (SP3), SQL Server 2000 SP3a, or SQL Server 2000 SP4 on that computer.

WORKAROUND

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
You can use one of the following methods to work around this problem.

Modify the registry to grant read permissions to specific keys

For each instance of SQL Server 2000 that you installed after you installed SQL Server 2005, follow these steps:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate the following registry subkey:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\InstanceName
    In this subkey, InstanceName is the name of the instance of SQL Server 2000.

    Note If you installed SQL Server 2000 as the default instance, the registry subkey is the following:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer
  3. On the Edit menu, click Permissions.
  4. Click Add, type SQLServer2005SQLBrowserUser or type SQLServer2005SQLBrowserUser$ComputerName, and then click OK.

    Note The account group name SQLServer2005SQLBrowserUser may be SQLServer2005SQLBrowserUser$ComputerName on your computer. You can find this group name in Local Users and Groups in Computer Management. In this step, ComputerName in SQLServer2005SQLBrowserUser$ComputerName is the name of your computer.
  5. Click to select the Read check box in the permission list for this user account, and then click OK.
  6. Quit Registry Editor, and then restart the SQL Server Browser service.
Note The permissions should be inherited by the child keys. If the permissions are not inherited, you have to explicitly grant the read permission to SQLServer2005SQLBrowserUser or to SQLServer2005SQLBrowserUser$ComputerName for the following keys, if they are present:
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<InstanceName>\CurrentVersion
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<InstanceName>\SuperSocketNetLib
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<InstanceName>\Cluster
Note In this subkey, InstanceName is the name of the instance of SQL Server 2000.

If the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<InstanceName>\SuperSocketNetLib
registry subkey is not inherited, you must manually modify the underlying keys for this registry subkey.

Note SQL Server 7.0 did not have named instances. Therefore, the relevant registry key should have inherited the appropriate permission from the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer
registry subkey. However, if the permission has not been inherited, you must manually set the permission.

Explicitly specify the connection information in the connection string

When you connect to an instance of SQL Server 2000 or of SQL Server 7.0 from the client, you can explicitly specify the connection information in the connection string. You specify this information so that the connection information is not dependent on the information being returned by the server. For example, you can connect to the instance by using the command that similar to the following command when you use the Sqlcmd utility.
sqlcmd –S tcp:yourhost,1500

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Properties

Article ID: 905618 - Last Review: March 10, 2006 - Revision: 3.4
APPLIES TO
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Express Edition
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Workgroup Edition
Keywords: 
kbtshoot kberrmsg kbprb KB905618

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com