none
cannot connect to SQL Server 2008 instance

    Question

  • SQL server 2008 .  When I try to connect, this error appears:TITLE: Connect to Server
    ------------------------------

    Cannot connect to MyServerNAME.

    ------------------------------
    ADDITIONAL INFORMATION:

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

    ------------------------------
    BUTTONS:

    OK
    ------------------------------

    How do I resolve this?

    Sunday, October 25, 2009 1:34 PM

Answers

All replies

  • If I understand, you are trying to connect to a remote SQL Server instance.

    1) On machine where sql server is running, in Sql Server Management Studio right click the instance you are trying to connect, go to Properties -> Connections -> Check "Allow remote connections to this server". Restart SQL service after that.

    2) Check SQLBrowser Services is running. You may also need to create an exception in your firewall for SQLBrowser services.

    3) Create a firewall exception for port 1433

     Start --> Run --> Firewall.cpl
     Click on exceptions tab
     Add the sqlservr.exe (typically located in C:\Program Files (x86)\Microsoft SQL Server\MSSQL.x\MSSQL\Binn), and port (default is 1433)


    4) From your computer check that you can connect to the SQL Server. Note *name* you are using to connect: machine name, domain name or IP address? Use this when checking connectivity. For example if you are using mysqlserver

    for e.g.
    Start --> Run --> cmd
    •telnet mysqlserver 1433
    •ping -a mysqlserver

    Check ports  and IP addresses  being returned  matches.

    Sunday, October 25, 2009 3:38 PM
  • If you click on the help link for the error message, it suggests that the cause of the problem is that the  SQL Server service is not running (not started).  You can verify that the SQL Server service is running by going to SQL Server Configuration Manager.  Look to see if the SQL Server service is running. If it isn't, right-click the service and select Start.

    Regards,
    Gail



    Gail Erickson [MS] This posting is provided "AS IS" with no warranties, and confers no rights
    Sunday, October 25, 2009 4:36 PM
  • The sql server service state is 'stopped' and I cannot get it to start.  It tried and gave a timeout.   It is not a remote connection, but this machine.  I am using vista premium.  No telnet service here.  Any suggestions?
    Sunday, October 25, 2009 10:32 PM
  • Can you check the event viewer to know why sql services are not able to start ?
    Thanks, Leks
    Sunday, October 25, 2009 10:38 PM
    Answerer
  • Where do I find the event viewer?

    Sunday, October 25, 2009 11:54 PM
  • START - Run - eventvwr
    Thanks, Leks
    Monday, October 26, 2009 12:01 AM
    Answerer
  • I ran it and this is the log from the service control manager:
    Log Name:      System
    Source:        Service Control Manager
    Date:          10/26/2009 10:29:31 AM
    Event ID:      7024
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      MyServerNAME
    Description:
    The SQL Server (MyServerNAME) service terminated with service-specific error 126 (0x7E).
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Service Control Manager" Guid="{555908D1-A6D7-4695-8E1E-26931D2012F4}" EventSourceName="Service Control Manager" />
        <EventID Qualifiers="49152">7024</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2009-10-26T02:29:31.000Z" />
        <EventRecordID>80709</EventRecordID>
        <Correlation />
        <Execution ProcessID="0" ThreadID="0" />
        <Channel>System</Channel>
        <Computer>MyServerNAME</Computer>
        <Security />
      </System>
      <EventData>
        <Data Name="param1">SQL Server (MyServerNAME)</Data>
        <Data Name="param2">126 (0x7E)</Data>
      </EventData>
    </Event>


    Also, the application error log:
    Log Name:      Application
    Source:        MSSQL$MyServerNAME
    Date:          10/26/2009 10:29:30 AM
    Event ID:      17182
    Task Category: Server
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      MyServerNAME
    Description:
    TDSSNIClient initialization failed with error 0x7e, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. The specified module could not be found.

    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="MSSQL$MyServerNAME" />
        <EventID Qualifiers="49152">17182</EventID>
        <Level>2</Level>
        <Task>2</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2009-10-26T02:29:30.000Z" />
        <EventRecordID>23003</EventRecordID>
        <Channel>Application</Channel>
        <Computer>MyServerNAME</Computer>
        <Security />
      </System>
      <EventData>
        <Data>7e</Data>
        <Data>1</Data>
        <Data>Initialization failed with an infrastructure error. Check for previous errors.</Data>
        <Data>The specified module could not be found.
    </Data>
        <Binary>1E430000100000000A0000005600410049004F005C005600410049004F00000000000000</Binary>
      </EventData>
    </Event>

    Monday, October 26, 2009 2:38 AM
  • Can try to start the service after disabling the VIA protocol.

    Do this for disabling VIA protocol for sql server ,,
    Start->All Programs -> Microsoft Sql server 2005 -> Configuration Tools -> SQL Server Configuration Manager.
    In the SQL SERVER configuration Manager Window, click the plus (+) sign against SQL SERVER 2005 Network Configuration.
    Highlight 'Protocols for MS SQL SERVER'
    In the right pane you'd find VIA in protocol name column , you can right click it san select 'Disable'


    Thanks, Leks
    Monday, October 26, 2009 5:48 AM
    Answerer
  • No startup of sql server service.  Error now reads:

     

    Log Name: System

    Source: Service Control Manager

    Date: 10/26/2009 2:22:17 PM

    Event ID: 7011

    Task Category: None

    Level: Error

    Keywords: Classic

    User: N/A

    Computer: MyServerNAME

    Description:

    A timeout (30000 milliseconds) was reached while waiting for a transaction response from the ReportServer$MyServerNAME service.

    Event Xml:

    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">

    <System>

    <Provider Name="Service Control Manager" Guid="{555908D1-A6D7-4695-8E1E-26931D2012F4}" EventSourceName="Service Control Manager" />

    <EventID Qualifiers="49152">7011</EventID>

    <Version>0</Version>

    <Level>2</Level>

    <Task>0</Task>

    <Opcode>0</Opcode>

    <Keywords>0x80000000000000</Keywords>

    <TimeCreated SystemTime="2009-10-26T06:22:17.000Z" />

    <EventRecordID>80732</EventRecordID>

    <Correlation />

    <Execution ProcessID="0" ThreadID="0" />

    <Channel>System</Channel>

    <Computer>MyServerNAME</Computer>

    <Security />

    </System>

    <EventData>

    <Data Name="param1">30000</Data>

    <Data Name="param2">ReportServer$MyServerNAME</Data>

    </EventData>

    </Event>

     

     

    Monday, October 26, 2009 6:27 AM
  • Did you enable TCP/IP protocol for remote Server?
    Wednesday, October 28, 2009 5:31 AM
  • The TCP/IP has been enabled.  How do you do so for the remote server.  The problem is with the local server that I am not able to get running.
    Wednesday, October 28, 2009 2:33 PM
  • I got the answer.  It was here: http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/c5323e24-73f3-4c7d-9623-441f05db5d1e/
    Hope this will help anyone facing the same problem.
    • Marked as answer by LekssEditor Monday, November 02, 2009 2:04 AM
    Monday, November 02, 2009 1:51 AM
  • Disable VIA from SQL Configuration manager and try restarting the service again.
    Sunday, July 18, 2010 11:47 PM
  • Basically if we use only machine name as server name than it logins to SQL SERVER 2008 but if we provide \SQLSRVER or \SQLEXPRESS than it logins with compatibility of SQL SERVER 2005

    As date is valid data type 2008 onward.

    Wednesday, January 26, 2011 6:12 AM