Error 40

  • I want to configurate a Merge Replication and I couldn´t connect to a Subscriber.

    When I try to connect, it refused me and this message appears:

    Cannot connect to HUELLAS.

    ------------------------------

    ADDITIONAL INFORMATION:

    An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

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

    The port 1433 TCP and 1434 UDP are working correctly.

    What can I do to resolve this problem?

    Thanks a lot

  • Hi,

    If you are getting error 40, then 53 it means the server cannot be contacted which sometimes means the server is actually out, that happened to my development team twice. Here are other reasons and how to fix it from Microsoft.

    http://blogs.msdn.com/sql_protocols/archive/2007/05/16/named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error-xxx.aspx

    Kind regards,
    Gift Peddie

  • Hi, I have another problem with another subscriber. Here is the message:

    TITLE: Connect to Server

    ------------------------------

    Cannot connect to HUELLAS\SCASINO.

    ------------------------------

    ADDITIONAL INFORMATION:

    An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

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

    ------------------------------

    BUTTONS:

    OK

    ------------------------------

    I verified and the Server hasn´t got a firewall activated and the port 1434 UDP is functioning correctly.

    What can I do?

    Thanks

  • In my case what it worked for me was the Hosts file in the folder C:\Windows\System32\drivers\etc

    I was trying to connect into a SQL server with a name that has an entry in the HOSTS file; however, the IP in the HOSTS file was unreachable - Nonexisting - 

    First, I connected using my SQL  client using the IP address and it was no problem.
    Next, I delete the entry for the SQL server name in the HOST file in the folder C:\Windows\System32\drivers\etc, saved it and again tried to connect into that SQL server using the name that I just deleted from the host file and it went thru without issues.

    I hope it helps someone along the way

Viewing 4 posts - 1 through 3 (of 3 total)

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