Home  >  Article  >  How to check the port of sqlserver

How to check the port of sqlserver

下次还敢
下次还敢Original
2024-04-05 21:54:191125browse

You can view the SQL Server port by using the following method: Use SQL Server Configuration Manager to open "Protocols for MSSQLSERVER" and view "TCP Port". Using PowerShell, run "Get-Service mssqlserver | Select-Object Name, DisplayName, StartMode, Status" and look at the "DisplayName" column. Use a port scanner to scan the host and find the ports it is listening on, including SQL Serv

How to check the port of sqlserver

How do I view the SQL Server port?

There are several ways to view the SQL Server port:

1. Use SQL Server Configuration Manager

  • Open SQL Server Configuration Manager.
  • Expand "SQL Server Network Configuration" in the left pane and select "Protocols for MSSQLSERVER".
  • In the right pane, find the row named "TCP/IP".
  • Display the SQL Server port under the "TCP Port" column.

2. Use PowerShell

  • Open the PowerShell console.
  • Run the following command:
<code class="powershell">Get-Service mssqlserver | Select-Object Name, DisplayName, StartMode, Status</code>
  • The row with the status "Running" displays the SQL Server port, located after the "DisplayName" column.

3. Use a port scanner

  • Use a port scanner, such as Nmap or Netcat, to scan the running SQL Server host.
  • The port scanner will return the ports it is listening on, including the SQL Server port.

Note: SQL Server uses port 1433 by default, but can be configured to use other ports.

The above is the detailed content of How to check the port of sqlserver. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn