Forum Discussion

Yogesh_05's avatar
Yogesh_05
Occasional Reader
Oct 30, 2024

Connect Remote SQL server with SSMS issue

I am trying to connect the SQL Server Remote user with SSMS but I face the below issue  

TITLE: Connect to Server
------------------------------

Cannot connect to "blank_for_security"

------------------------------
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: 53)

For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-53-database-engine-error

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

The network path was not found

  • SivertSolem's avatar
    SivertSolem
    Iron Contributor

    The named pipes thing is generally a misleading part of this error.
    Remote connections attempt TCP first, then named pipes.
    If both fail, only Named Pipes show up in the error.

    You are unable to connect to you SQL Server instance because of a networking issue.
    Assuming your SQL Server installation is using the default port configuration, you can run Test-NetConnection in powershell.
    You want "TcpTestSucceded: True" to be part of the output.

    Test-NetConnection -ComputerName SQLServerHostName -Port 1433

    At this point you can get one of several failure modes:

    1. Host name resolution failed - You have the wrong name or there's a DNS issue. Talk to your IT department.
    2. TcpTestSucceded: False - SQL Server is not listening on TCP 1433 or you've been blocked in a firewall. Talk to your IT department.
    3. TcpTestSucceded: True - Try SSMS again, this particular issue should have been resolved.
      1. As dalek suggested, you may have to trust the server certificate.
  • rodgerkong's avatar
    rodgerkong
    Iron Contributor

    Yogesh_05 

    On your server side, open SQL Server Configuration Manager to check protocol. If "Named Pipes" status is Disabled(which is default after install) turn it to Enabled, then try connect again.

     

    Or, read the document from the link in the message.

    • dalek's avatar
      dalek
      Copper Contributor

      Adding to rodgerkong

      Ensure that the TCP/IP is enabled. On the Connect to Server, make sure to check the "Trust the server certificate" box and click ok.

Resources