如何在SQL Management Studio中指定不同的端口号?

时间:2021-03-27 16:28:11

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?

我正在尝试连接到一个不在1433端口上的Microsoft SQL 2005服务器。如何在使用SQL Management Studio连接服务器时指示不同的端口号?

6 个解决方案

#1


673  

127.0.0.1,6283

127.0.0.1,6283

Add a comma between the ip and port

在ip和端口之间添加一个逗号

#2


55  

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.

如果您正在连接一个已命名的实例,并且在连接到它时UDP不可用,那么您可能还需要指定协议。

Example:

例子:

tcp:192.168.1.21\SQL2K5,1443

tcp:192.168.1.21 \ SQL2K5,1443年

#3


6  

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.

另一种方法是在配置管理器中设置别名。然后,当您想要连接时,只需输入别名即可。当您必须在多个端口和/或多个协议上管理多个服务器/实例和/或服务器时,这将使管理变得更容易和更可取。给他们友好的名字,记住他们就容易多了。

#4


2  

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.

您将需要SQL Server配置管理器。转到Sql本机客户端配置,选择客户端协议,右键单击TCP/IP并在那里设置默认端口。

#5


2  

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

使用上面的逗号:这也可以在app.config中使用

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

如果您和服务器之间也有防火墙,那么可能需要它……

#6


-6  

On Windows plattform with server execute command:

在Windows plattform上使用服务器执行命令:

netstat -a -b

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

查找sql server进程并找到端口f。e 49198

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

或更容易。连接dbvisualizer,运行netstat -a -b查找dbvis。exe进程并获取端口。

#1


673  

127.0.0.1,6283

127.0.0.1,6283

Add a comma between the ip and port

在ip和端口之间添加一个逗号

#2


55  

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.

如果您正在连接一个已命名的实例,并且在连接到它时UDP不可用,那么您可能还需要指定协议。

Example:

例子:

tcp:192.168.1.21\SQL2K5,1443

tcp:192.168.1.21 \ SQL2K5,1443年

#3


6  

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.

另一种方法是在配置管理器中设置别名。然后,当您想要连接时,只需输入别名即可。当您必须在多个端口和/或多个协议上管理多个服务器/实例和/或服务器时,这将使管理变得更容易和更可取。给他们友好的名字,记住他们就容易多了。

#4


2  

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.

您将需要SQL Server配置管理器。转到Sql本机客户端配置,选择客户端协议,右键单击TCP/IP并在那里设置默认端口。

#5


2  

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

使用上面的逗号:这也可以在app.config中使用

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

如果您和服务器之间也有防火墙,那么可能需要它……

#6


-6  

On Windows plattform with server execute command:

在Windows plattform上使用服务器执行命令:

netstat -a -b

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

查找sql server进程并找到端口f。e 49198

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

或更容易。连接dbvisualizer,运行netstat -a -b查找dbvis。exe进程并获取端口。