Sunday, February 12, 2012

Connecting to SQL Server on a different port

I have a server running SQL Server 2005 Dev behind a firewall that blocks the default SQL Server port. So, I changed the port that SQL server uses to another port. How do I connect to the database instance with SQL Server Management Studio. I have tried:

xxx.xxx.xxx.xxx\MSSQLSERVER
xxx.xxx.xxx.xxx:port\MSSQLSERVER

name.of.machine\MSSQLSERVER

On all of these, I get an error 25 - Connection string is not valid. I have the surface area configured correctly (i.e. named pipes and TCP/IP are both turned on), and the sql server browser is running. I can ping the server just fine, and when I go to GRC.com and do a shields up report it lists my port of choice as being open.

What am I missing?

I also set the native client configuration's default port to the port I want to connect to, and it appears that that didn't work either.

Ideas? I would like to get this running ASAP.

Thanks in advance!Also, opening up that port on the firewall is not an option. I don't have access to the firewall. I'm doing this for a school project, and I have to work under their restrictions.|||

Use server="servername,port_number" (take note of the comma)

Or,you can create a DNS entry that defines the server name and IP address combination. This is normally done on the DNS server. Just make sure that this entry is allowed in your firewall

http://support.microsoft.com/kb/269882/

No comments:

Post a Comment