Find the port used by which process in windows
Faced one issue during configuring listener with netca utility. Its show me that port – 1521 is already in used. But when i checked the listener services is not running. Then i took backup of network folder and drop the listener on window platform. But again when try to reconfigure listener throw same error.
Then I checked with windows commands to find which application is using 1521.
1. From command prompt administrator windows run following command:
Show all running process
Check only for 1521 port:
netstat -aon | find "1521"
E:\patch_backup\deinstall>netstat -aon | find "1521"
Proto Local Address Foreign Address State Process
TCP 0.0.0.0:1521 0.0.0.0:0 LISTENING 2612
TCP 127.0.0.1:1521 127.0.0.10:57934 ESTABLISHED 2612
TCP 127.0.0.1:1521 127.0.0.10:57935 ESTABLISHED 2612
TCP 127.0.0.1:1521 127.0.0.10:57938 ESTABLISHED 2612
a : List all connections and listening ports.
O : List the owning process ID
n : List addresses and port numbers.
2. Verify the listener is running from which process id
tasklist /m ora*
Image Name PID Modules
========================= ======== ============================================
TNSLSNR.EXE 2612 oransgr11.dll, oran11.dll, oranl11.dll,
orantcp11.dll, oracore11.dll, oranls11.dll,
3. Kill the task if needed
taskkill /PID 2612 /F