how do i get tcp ports in oracle server sql?

As far as I can tell, you can’t. There’s no select statement you could run which would reveal that information.

From the command prompt, you could try with tnsping, e.g.

c:\Temp>tnsping xe

TNS Ping Utility for 64-bit Windows: Version - Production on 06-STU-2
020 21:38:22

Copyright (c) 1997, 2014, Oracle.  All rights reserved.

Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = lflaptop)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (20 msec)                                                                             ----
                                                                                     here it is

Or, you could ask your DBA, they know.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top