Find SQL Server running port

24 Mar

In order to find which port the sql server instance is running on – run this query towards the database:

USE master GO xp_readerrorlog 0, 1, N'Server is listening on' GO

or

SELECT DISTINCT
local_tcp_port
FROM sys.dm_exec_connections
WHERE local_tcp_port IS NOT NULL

From the command line when you have PID (task manager for sqlsrv.exe)
netstat -ano | findstr *PID*

 

Read more

http://stackoverflow.com/questions/12297475/how-to-find-sql-server-running-port

http://www.mssqltips.com/sqlservertip/2495/identify-sql-server-tcp-ip-port-being-used/

 

 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: