SQL Server instance port view steps: Connect to the SQL Server instance. Query the sys.tcp_endpoints table for a service named "MSSQLSERVER". The "port" column corresponding to the service is the TCP port number of the instance.
SQL Server port view method
View SQL Server port
You can view the port of the SQL Server instance through the following steps:
1. Connect to the SQL Server instance
2. Query the sys.tcp_endpoints table
<code class="sql">SELECT port FROM sys.tcp_endpoints WHERE service_name = 'MSSQLSERVER';</code>
3. Find the port of the MSSQLSERVER service
Example
For example, if the query result is as follows:
<code>port 1433</code>
The port number of the instance is 1433.
The above is the detailed content of Where can I find the sqlserver port?. For more information, please follow other related articles on the PHP Chinese website!