SQL SERVER – Fix : Error : 1326 Cannot connect to Database Server Error: 40 – Could not open a connection to SQL Server

If you are receiving the following error related to connection to SQL Server, this blog is for you.

TITLE: Connect to Server
——————————
Cannot connect to Database Server.
——————————
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: 1326)

I suggest that you read previous article first as that describes how to fix the problem and has worked in many cases.

SQL SERVER – Fix : Error : 40 – could not open a connection to SQL server

Solarwinds

Now if SQL Server can be connected perfectly from local system, but cannot be connected from a remote system, in that case firewall on the server where SQL Server is installed can be issued.

SQL SERVER - Fix : Error : 1326 Cannot connect to Database Server Error: 40 - Could not open a connection to SQL Server firewall4

Follow instructions of this article to fix the issue.

Go to control panel >> Firewall Settings >> Add SQL Server’s Port to Exception List.

SQL SERVER - Fix : Error : 1326 Cannot connect to Database Server Error: 40 - Could not open a connection to SQL Server firewall

SQL SERVER - Fix : Error : 1326 Cannot connect to Database Server Error: 40 - Could not open a connection to SQL Server firewall2

SQL SERVER - Fix : Error : 1326 Cannot connect to Database Server Error: 40 - Could not open a connection to SQL Server firewall3

Now try to connect to SQL Server again. It will allow you to connect to the server successfully. Please leave a comment with your experience.

Reference: Pinal Dave (https://blog.sqlauthority.com)

Solarwinds
, ,
Previous Post
SQLAuthority News – Security Update for SQL Server 2000 Service Pack 4 and MSDE 2000
Next Post
SQLAuthority News – SQL Server 2008 Downloads Availables

Related Posts

140 Comments. Leave new

  • OMG… having tried all of the above I finally found MY problem.. it was because I had NOT SET A CONNECTION STRING in my Data Source. I did not think it was necessary as I was logging using a SQL Login and I assumed it would be intelligent enough to figure it out… hmmm not so. Test Connection showed it was OK without the connection string but when I tried to create the report it failed with Error: 40 – Could not open a connection to SQL Server

    Reply
  • 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: 1327)
    Can you help me, please?

    Reply
  • It’s worked for me, thankyou

    Reply
  • thanx its worked with me

    Reply
  • fix epson error code 0xf4
    May 10, 2019 1:12 pm

    Go to control panel >> Firewall Settings >> Add SQL Server’s Port to Exception List. And then try to reconnect to SQL Server again. It will allow you to connect to the server successfully.

    Reply

Leave a Reply

Menu