简体   繁体   中英

How to use a host and port for a SQL Server connection

I was given a host and a port to connect to a database using SQL Server Management studio. I usually create a new connection using the server name which I do not have this time. I tried to write "host, port" in the box of the server name but the connection failed. Does anyone know how to solve this issue? Thanks

I tried to write "host, port" in the box of the server name but the connection failed.

That's the correct format. So you're on to network troubleshooting. eg in powershell

 Test-NetConnection -ComputerName [host] -Port [port]

I use the next format to connect by SSMS:

tcp:YOUR_IP_ADDRESS\INSTANCE_NAME, PORT_NUMBER

For example, my home connection lools like this:

tcp:localhost\MSSQLSERVER, 1433

Or this:

tcp:localhost, 1433

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM