MSQuery: "Connection Failed" Error Connecting to SQL Server

ID: Q125399


The information in this article applies to:


SYMPTOMS

When you connect to an SQL Server data source, such as Microsoft SQL Server or Sybase SQL Server, you may receive the following error message:

Connection Failed:
SQLState: '08001'
SQL Server Error: -1
[Microsoft][ODBC SQL Server Driver]Unable to connect to data


CAUSE

This error message usually indicates that the client workstation cannot find the SQL Server on the network. Possible causes for this problem include the following:


   If you are using Microsoft Query for Windows or Windows NT
   ----------------------------------------------------------

   - TCP/IP Sockets support has not been enabled on the SQL Server.

   - The client workstation has not been set up to run TCP/IP properly.

   - The SQL Server data source has not been setup with the proper TCP/IP
     address for the server.

   If you are using Microsoft Query for the Macintosh
   -------------------------------------------------

   - You may receive the error message stated above if the MacTCP Control
      Panel device has not been installed. 






WORKAROUNDS

If you are using Microsoft Query for Windows or Windows NT

Method 1: Enable TCP/IP on the SQL Server (Windows NT)

To do this, follow these steps:

  1. Run the SQL Server Setup program from the SQL Server.


  2. In Options dialog box, click the Change Network Support option, and then click Continue.


  3. Make sure the TCP/IP Sockets option is selected, and then click OK.


  4. The next two dialog boxes display the Port Number and Network Address.

    You should not need to change these, but you should verify that they are correct.


  5. Return to Windows NT.


Method 2: Configure the Client Workstation for TCP/IP Connectivity

Microsoft Query for the Macintosh:

In Microsoft Query for the Macintosh, you may receive the error message described in the "Symptoms" section if the MacTCP Control Panel device has not been installed. MacTCP is distributed with Apple Macintosh System 7.5. To add the MacTCP icon to the Control Panels folder, run the Setup program for System 7.5.

For additional information, please see the following article in the Microsoft Knowledge Base:

Q120254 : "Configuring MacTCP for ODBC Use"

Additional query words: ODBC TCP IP connectivity


Keywords          : kbenv kbnetwork xlquery 
Version           : WINDOWS:1.0,2.0; MACINTOSH:1.00
Platform          : MACINTOSH WINDOWS 
Issue type        : 

Last Reviewed: April 14, 1999