SQL Server – How to Find the Dynamic Port reserved by SQL Server?

Hi Friends,

In my last blog “SQL Server runs on which port?” we discussed about the Defualt and Dynamic Port.

Now the question is how to find Dynamic Port reserved by SQL Server, I know your answer would be we’ll simply go and check the details through SQL Server Configuration Manager.

But what if you don’t have RDP Access to SQL Server?

If you don’t have RDP Access you can check the Dynamic Port No. reserved by SQL Server through SQL Server Error Log.

Now if you read the SQL Server Errorlog, you’ll find an entry “Server is listening on <49179>”.

In this row value 49179 is the port no. assigned to SQL Server normal connections & for DAC Connections SQL Server is listening on port 49180.

Since i am using Windows 7 there are two entries one for IPV4 and other one for IPV6. Please refer the Screenshot below:

   

1_How_to_Find_the_Dynamic_Port_reserved_by_SQL_Server

 

Regards

Sarabpreet Anand

Like us on FaceBook Follow us on Twitter | Join the fastest growing SQL Server group on FaceBook

Follow me on Twitter  |  Follow me on FaceBook

   

One Comment on “SQL Server – How to Find the Dynamic Port reserved by SQL Server?”

  1. Hi Sarabpreet,

    Is there any place in SQL server where it stores the static and dynamic port numbers. I need to run a query whcih would retrieve the numbers. I know you can look into the configuration manager/Event Viewer/Error logs. But does sql store the information in any sys tables?

    The sys.dm_exec_connections contains on the static port numbers but i want both.

    Thanks

    Amitav

Leave a Reply

Your email address will not be published.