Instantly share code, notes, and snippets.

Embed
What would you like to do?
# You first need to get PID of SQL Server process - sqlservr.exe with this command:
tasklist|find /I "sql"
# It will give you output similar to this one:
# sqlwriter.exe 2168 Services 0 7,804 K
# sqlceip.exe 2768 Services 0 57,876 K
# sqlservr.exe 4620 Services 0 298,496 K
# sqlbrowser.exe 3488 Services 0 4,752 K
# Take a note of PID for sqlservr.exe and use it to check ports which this process is listening
netstat -na | find "4620"
# You will get output similar to this one:
# TCP 0.0.0.0:50673 0.0.0.0:0 LISTENING 4620
# TCP 99.55.11.11:50673 10.32.1.90:52681 ESTABLISHED 4620
# TCP 127.0.0.1:50032 0.0.0.0:0 LISTENING 4620
# TCP [::]:50673 [::]:0 LISTENING 4620
# TCP [::1]:50032 [::]:0 LISTENING 4620
# In this case you instance port is 50673
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment