Take SQL Server R2 as an example for analysis:
SQL Server Connection Port number analysis |
SQL Server Browser |
Start
|
Stop it |
Static port |
1433 |
①√ |
④√orx |
Xxxxx |
②√ |
⑤√orx |
Dynamic ports |
Yyyyy |
③√ |
⑥x |
①②③
After the SQL Server Browser service is started, whether it is a single instance or multiple instances, the instance port number is statically specified or dynamically allocated, and the client can connect normally.
The client first accesses the UDP 1434 port of the SQL Server server, and then the UDP 1434 port returns information such as the instance name, port number, and version number of all instances on the client's SQL Server server.
Finally, the client connects to an instance based on the port number.
Note: For static ports, the client can also access the instance directly from the port number, knowing that the instance corresponds to the port number.
④⑤
The client can access the instance directly through the port number, knowing that the instance corresponds to the port number.
If you do not know the instance and port number corresponding to the case, there is no SQL Server Browser service can query, do not know to access an instance need to connect which port number, so cannot access the instance.
⑥
There is no SQL Server Browser service available to query, and you do not know which port number is required to access an instance, so you cannot access the instance.
Note: Dynamic ports will change after each restart.
This article is from the "Triangle" blog, be sure to keep this source http://www1707.blog.51cto.com/1184226/1639539
SQL Server Connection Port number analysis