none
2014 with error message 40 RRS feed

  • Question

  • I have the SQL server 2014 version and I keep coming up with an error message 40. "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) The system cannot find the file specified."

    The TCP for Express and SQLServer are also enabled. The Browser is Running but the Express is not. That also gives me an error message. I can not change my settings for Firewall, due to my job's security.

    Can someone please!!!!! HELP ME!!

    Wednesday, February 25, 2015 8:23 PM

Answers

  • Hi fenscs08,

    (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL server) ( Microsoft SQL server, Error: 2) The system cannot find the file specified."

    The above error message means that the client can reach the server but there is no Named Pipe listener with specific pipe name on the target machine. It also means the account can have a file sharing session without a problem. Possible reasons are:

     a) typo in instance name or wrong instance name. The instance name is not the one you are targeting. Please make sure that you use the correct instance name.

     b) Target SQL Server is not running. You can check the SQL Server Services running status in SQL Server Configuration Manager (SSCM).

     c) Named Pipe is not enabled on the server. In this case, the SQL server is not listening on the specific pipe name. Please ensure that you enable Named Pipe in SSCM.

    Reference:
    Named Pipes Provider, error: 40 - Could not open a connection to SQL Server (Microsoft SQL Server, Error: XXX)


    Thanks,
    Lydia Zhang


    Lydia Zhang
    TechNet Community Support



    Friday, February 27, 2015 3:22 AM
    Moderator

All replies

  • Hi,

    Could you provide the content of the error logs which are defaulted to the following location C:\Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\LOG\ unless you specify a different root directory during install.

    Cheers

    Bhanu



    • Edited by bhanu_nz Wednesday, February 25, 2015 11:01 PM
    Wednesday, February 25, 2015 10:59 PM
  • Hi fenscs08,

    (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL server) ( Microsoft SQL server, Error: 2) The system cannot find the file specified."

    The above error message means that the client can reach the server but there is no Named Pipe listener with specific pipe name on the target machine. It also means the account can have a file sharing session without a problem. Possible reasons are:

     a) typo in instance name or wrong instance name. The instance name is not the one you are targeting. Please make sure that you use the correct instance name.

     b) Target SQL Server is not running. You can check the SQL Server Services running status in SQL Server Configuration Manager (SSCM).

     c) Named Pipe is not enabled on the server. In this case, the SQL server is not listening on the specific pipe name. Please ensure that you enable Named Pipe in SSCM.

    Reference:
    Named Pipes Provider, error: 40 - Could not open a connection to SQL Server (Microsoft SQL Server, Error: XXX)


    Thanks,
    Lydia Zhang


    Lydia Zhang
    TechNet Community Support



    Friday, February 27, 2015 3:22 AM
    Moderator