0

We have a MSSQL Server that has localhost connections, but need to have one connection to another machine. The other machine needs to login to MSSQL server.

We added an Inbound Windows Firewall rule for Port 1433 and only that machine's IP, but it causes the connection to fail. The message from a PHP script states: SQLSTATE[08001]: [Microsoft][ODBC Driver 11 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [1326].

As soon as I allow all IPs again the connection, queries, and PHP script works as expected.

What am I missing to make sure that only that IP and localhost can access MSSQL?

Thanks!

3
  • Please clarify your question/ you state need to have one connection to another machine, so is the connection TO or FROM this other machine? If FROM this other machine did you create an inbound firewall rule on the SQL server? What do you mean it causes the connection to fail? What specifically happens? What messages do you get when attempting to connect?
    – joeqwerty
    Aug 6, 2015 at 15:53
  • I have updated the question to specify, but basically the other machine is running PHP and needs to query the MSSQL server.
    – Andrew T
    Aug 6, 2015 at 16:13
  • It may be because you're using Named Pipes to connect rather than TCP. Have you tried changing your connection from your PHP machine to connect via TCP? Have a read here and see if it applies to your situation - blogs.technet.com/b/deploymentguys/archive/2008/09/02/…
    – joeqwerty
    Aug 6, 2015 at 16:53

0

You must log in to answer this question.

Browse other questions tagged .