How do you specify a different port number in SQL Management Studio?

Sql ServerSql Server-2005Ssms

Sql Server Problem Overview


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?

Sql Server Solutions


Solution 1 - Sql Server

127.0.0.1,6283

Add a comma between the ip and port

Solution 2 - Sql Server

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

Solution 3 - Sql Server

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.

Solution 4 - Sql Server

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.

Solution 5 - Sql Server

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...

Solution 6 - Sql Server

On Windows plattform with server execute command:

netstat -a -b

look for sql server processes and find port f.e 49198

Or easier. Connect with dbvisualizer, run netstat -a -b find dbvis.exe process and get port.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBrettskiView Question on Stackoverflow
Solution 1 - Sql ServerNescioView Answer on Stackoverflow
Solution 2 - Sql ServerJamesView Answer on Stackoverflow
Solution 3 - Sql ServermattlantView Answer on Stackoverflow
Solution 4 - Sql ServerMikeView Answer on Stackoverflow
Solution 5 - Sql ServergbnView Answer on Stackoverflow
Solution 6 - Sql ServerguestView Answer on Stackoverflow