By default Sql server may not be listening for TCP/IP connections.
Did you check this stackoverflow question?
Also check start the "sql server agent" service is started.
I doubt that it's easy to do hole punching with TCP or switch the process connected to a port.
Try this for a reverse proxy through the firewall:
http://www.dest-unreach.org/socat/doc/socat-gender.txt
This solutions relies on socat, a swiss-army-knife like network tool which can connect almost any two endpoints and is bidirectional, unlike netcat or the |-pipes in command processors. It should be available for Windows, too.
You can either use socat easily to forward a TCP connection, or in this case: Reverse the "gender" of it: You'll have two socats running, one on each side of the firewall. One continuously connects to the outside. On the outside, socat will wait for a connection from someone else. Only if he connects, the outside socat will accept a connection from the inside socat. Once the inside socat connects to the outside socat, it will connect to the SQL-server. Voila, you can connect from outside to the SQL-server inside, and from the point of the firewall and from the point of TCP the connection looked like it was actually from inside to outside.
To copy from the link:
1) Start the double client on the inside server
// every 10 seconds, it tries to establish a connection to the outside host.
// whenever it succeeds, it forks a sub process that connect to the internal
// service and starts to transfer data
$ socat -d -d -d -t5 tcp:outside-host:80,forever,intervall=10,fork tcp:localhost:80
2) Start double server on the outside client
// wait for a connection from a local client. whenever it accepted it, forks
// a subprocess that tries to bind to the socket where the inside double
// client tries to connect (might need to wait for a previous process to
// release the port)
$ socat -d -d -d tcp-l:80,reuseaddr,bind=127.0.0.1,fork tcp-l:80,bind=outside-host,reuseaddr,retry=10
Best Answer
You will be using the servername (DNS) or the IP address of the server. But if you have a named instance (as opposed to the default instance), your servername will be followed by
\instanceName
.So, in other words unless you changed any SQL Server Express install defaults, you should connect to the server like this:
SQL Server Express has a default named instance name of
SQLEXPRESS
. Also, since SQL Server Express is a named instance, you'll need to ensure that your SQL Server Browser service is running.Another one. If you are trying to connect to SQL Server from a separate machine, you'll need to ensure that the TCP/IP protocol is enabled for SQL Server.
The above two points can be verified and configured in SQL Server Configuration Manager.