Home >Common Problem >How to check the sqlserver port number
There are two ways to query the SQL Server port number: Use SQL Server Configuration Manager to view the "Port" field of the "TCP/IP" protocol. Use a T-SQL statement to execute SELECT net_transport, local_tcp_port FROM sys.dm_exec_connections WHERE session_id = @@SPID and then check the "local_tcp_port" field. The default port number is 1433, but other port numbers can be configured if necessary.
SQL Server port number query
How to query the SQL Server port number?
There are two ways to query the SQL Server port number:
Method 1: Use SQL Server Configuration Manager
Method 2: Use T-SQL statement
<code class="sql">SELECT net_transport, local_tcp_port FROM sys.dm_exec_connections WHERE session_id = @@SPID;</code>
Other notes:
The above is the detailed content of How to check the sqlserver port number. For more information, please follow other related articles on the PHP Chinese website!