SQL> select DBMS_XDB.GETHTTPPORT from dual;
GETHTTPPORT
-----------
8080
SQL>
P.S. Bah, not that port, I'm afraid. TNSPING might be what you're looking for:
C:\>tnsping xe
TNS Ping Utility for 64-bit Windows: Version 11.2.0.2.0 - Production on 28-SVI-2
018 21:03:53
Copyright (c) 1997, 2014, Oracle. All rights reserved.
Used parameter files:
C:\E_0_library\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = my-pc)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
^^^^^^^^^^^
this
OK (20 msec)
C:\>
By using the following function:
P.S. Bah, not that port, I'm afraid. TNSPING might be what you're looking for: