Windows Server 2003 - why a network-related or instance-specific error occurs and ways to fix it

JK Kwak 1 Reputation point
2021-01-11T05:14:08.617+00:00

Hi, my web server (MS Windows Server 2003, Standard Edition SP2) connecting to an MS SQL server (Windows Server 2008 R2 Standard) for an application is encountering from a few months ago an error message of " 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) " intermittently. Since it's been running with no such errer, I just fastened cable connections and changed switch box to a new one but still occurs. When it occurs it lasts only a few seconds or minutes. Pls experts here help me fix this error.

Thanks,
Jockey

SQL Server Other
{count} votes

3 answers

Sort by: Most helpful
  1. Tom Phillips 17,771 Reputation points
    2021-01-11T17:43:36.133+00:00

    That is a generic "could not connect to server" message and does not help diagnose the true problem in any way.

    Since this is an intermittent issue, it is likely you have a network problem or the SQL Server is too busy to respond to the login request. You would have to look at the server when it is happening.

    I would start here:
    https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/troubleshoot-connecting-to-the-sql-server-database-engine?view=sql-server-ver15#testing-a-local-connection


  2. CathyJi-MSFT 22,396 Reputation points Microsoft External Staff
    2021-01-12T07:55:08.313+00:00

    Hi @JK Kwak ,

    > When it occurs it lasts only a few seconds or minutes.

    SQL server connection failed intermittently, the issues may be caused by your network. Suggest you ask help for your network colleague to check your network. Or using network process monitor to capture the network package and analysis the files.

    Best regards,
    Cathy


    If the response is helpful, please click "Accept Answer" and upvote it, thank you.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Thin Thuzar Oo 5 Reputation points
    2023-01-11T08:23:25.72+00:00

    Untitled

    When you connect using Microsoft Management Studio, please type the port no 1433.

    Try Telnet command for 1433 also. In cmd.exe, type this command to check whether port 1433 is on : Telnet IPaddress or PC name 1433 (eg: Telnet 192.168.1.160 1433).

    If cmd shows black screen, the port is opening.

    please turn on Telnet Client in Win10 using Windows features on or off in Control panel.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.