views:

7816

answers:

5

I am trying to connect to a Microsoft SQL 2005 server which is not on port 1433. How do I indicate a different port number when connecting to the server using SQL management Studio?

Thank you,

Brett

+25  A: 

127.0.0.1,6283 add a comma between the ip and port

Nescio
+1 dude, you saved my life! LOL
jasonco
+1 spent an hour trying to track down what was wrong with my SQL Server-via-SSH tunnel setup. Turns out I had been using ip:port in Management Studio all along, not ip,port.
Anders Fjeldstad
A: 

You'll need the SQL Server Configuration Manager. Go to Sql Native Client Configuration, Select Client Protocols, Right Click on TCP/IP and set your default port there.

Mike
+2  A: 

Another way is to setup an alias in Config Manager. Then simply type that alias name when you want to connect. This makes it much easier and is more prefereable when you have to manage several servers/instances and/or servers on multiple ports and/or multiple protocols. Give them friendly names and it becomes much easier to remember them.

mattlant
+2  A: 

If you're connecting to a named instance and UDP is not available when connecting to it then you may need to specify the protocol as well.

Example:

tcp:192.168.1.21\SQL2K5,1443

James
This can be done from the SQL Management studio logon dialog?
Brettski
+1  A: 

Using the client manager affects all connections or sets a client machine specific alias.

Use the comma as above: this can be used in an app.config too

It's probably needed if you have firewalls between you and the server too...

gbn