A network-related or instance-specific error occurred while establishing a connection to SQL Server - Error

  • Dear All,

    I have been trying to resolve the following error message for a while now, but I have no luck!

    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)

    I have tried the following things so far:

    1. Made sure the Firewall is ON

    2. Ping the Server

    3. Made sure there is a a Firwall rule bFirewalllthe INBOUND and OUTBOUND for PORT TCP1433

    4. Enable TCP/IP

    5. Checked if SQL Server is running

    Would anyone please let me know if I'm missing anything please?

    Thank you in advance!

  • Is SQL Server Browser running? How exactly are you trying to connect (what are you typing in for server name)? Is it a default or named instance? Do you have named pipes enabled?

    Jared
    CE - Microsoft

  • SQLKnowItAll (7/19/2012)


    Is SQL Server Browser running? How exactly are you trying to connect (what are you typing in for server name)? Is it a default or named instance? Do you have named pipes enabled?

    Thank you for your reply!

    I can connect to the Server fine when I connect from my local machine, but the problem only occurs when I try to connect to the Remote Server. I have checked if the SQL Server Browser is running and I have also restarted SQL Server. The named pipes is also enabled.

  • How exactly are you trying to connect (what are you typing in for server name)? Is it a default or named instance?

    Jared
    CE - Microsoft

  • The name of the Server is the Default Server, so I did not have to type in anything.

  • Huh? You are connecting from a client to a server and you don't have to type anything in? That is the problem. You have to type in the server name of the server you are trying to connect to.

    Jared
    CE - Microsoft

  • I don't know if I wasn't clear before but, the problem is only connection not if I typed the Server name in myself or if the Server which I am tying to connect to is the Default Server.

  • tt-615680 (7/19/2012)


    I don't know if I wasn't clear before but, the problem is only connection not if I typed the Server name in myself or if the Server which I am tying to connect to is the Default Server.

    Very unclear... You are on a machine and trying to connect to a different machine that is hosting SQL Server? That is not working?

    Jared
    CE - Microsoft

  • As I said earlier, when I try to connect to the Server X from my local machine it works fine! But when I try and connect from the actual Server (Server X), which is the Remote Server; I get the "network-related" error message. I have also checked if the "Allow Remote Connection" is enabled, in the Server properties.

  • Ok, so you are on the actual server that is hosting SQL Server. and you are typing nothing in the server box to connect? Try typing localhost or simply a period (.)

    Jared
    CE - Microsoft

  • I did not say that I am not typing noting, I said the name of the Server is already there; hence why I said it is the Default Server.

  • When you log in from your client to the server with no issues, is it Windows or SQL authentication?

    Jared
    CE - Microsoft

  • I have tried both, but still nothing.

  • Ok, so to recap...

    1. On your "desktop" you can open ssms and connect to server type "database engine" by typing in RemoteServerName and using SQL Server Authentication

    2. You can remote into RemoteServerName using Remote Desktop

    3. When on RemoteServerName, you open SSMS and make sure server type is "database engine"

    4. You type in RemoteServerName and log in with same SQL Server Authentication that you did on your desktop

    5. You receive error and cannot log in

    Do I have everything correct so far?

    Jared
    CE - Microsoft

  • Try creating a SystemDSN entry on the machine you are trying to connect from AdminTools > ODBC DataSource Administrator > System DSN

    This can be a good initial test of connectivity

    SQL DBA
    Every day is a school day, and don't trust anyone who tells you any different.
    http://sqlblogness.blogspot.co.uk

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic. Login to reply