Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Identify port number of SQL server

Tags:

sql

sql-server

I Install SQL server in my system and I have to check on which port number SQL is working in my system

like image 379
Ankit jain Avatar asked Oct 18 '13 13:10

Ankit jain


People also ask

What is the SQL Server port number?

The default port for the SQL Server database engine is the 1433.

How do I know if SQL Server is port 1433 open?

On the local machine, click the Start button and enter “CMD” in the search programs and files field. If the port 1433 is closed, an error will be returned immediately. If the port 1433 is open, you will be able to connect to the MS-SQL server.

How do I find out what is using port 1433?

Check SQL Server configuration manager to see if it's a specific port, or dynamic ports. If it's using dynamic ports, then as long as you don't have multiple instances on the server, netstat -abn is probably the simplest way to find what it's using.


2 Answers

  1. Open SQL Server Management Studio
  2. Connect to the database engine for which you need the port number
  3. Run the below query against the database

    select distinct local_net_address, local_tcp_port from sys.dm_exec_connections where local_net_address is not null

The above query shows the local IP as well as the listening Port number

like image 166
Punter015 Avatar answered Sep 20 '22 05:09

Punter015


  1. Open Run in your system.

  2. Type %windir%\System32\cliconfg.exe

  3. Click on ok button then check that the "TCP/IP Network Protocol Default Value Setup" pop-up is open.

  4. Highlight TCP/IP under the Enabled protocols window.

  5. Click the Properties button.

  6. Enter the new port number, then click OK.

enter image description here

like image 28
Ankit jain Avatar answered Sep 20 '22 05:09

Ankit jain