Omri Btian
Omri Btian

Reputation: 6547

Connect ot SQL Server Express 2012 over the internet

I've been trying to configure my sql server express 2012 to recieve connections over the internet without any luck for hours (I'm using Team Foundation Service for nightly builds but it fails when it tries to run unit tests that interact with the sql server).

All I keep getting is this message :

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)

I have tried the following in order to solve this:

  1. Install and run SQL Server Browser
  2. Enable TCP/IP for the sql server instance (using the default SQLEXPRESS)
  3. Enable Port forwarding in my router
  4. Added SQL Server and SQL Server browser apps to the firewall allowed apps list.
  5. Banged my head against the wall.

My sql server is mixed mode, and the username and password are correct (it works when using the local ip address)

I've read every post here regarding this problem but nothing so far..

I'm pretty desperate so any advice will be greatly appreciated!

thanks

Upvotes: 0

Views: 2377

Answers (1)

Omri Btian
Omri Btian

Reputation: 6547

Solved it.

Only had to enter my public IP adress without the isntance name.

For example xxx.xxx.xxx.xxx instead of xxx.xxx.xxx.xxx\SQLEXPRESS

I can't believe it's such a stupid mistake ...

Upvotes: 2

Related Questions