3 Replies Latest reply: Aug 24, 2014 3:51 PM by Igoroshka RSS

    Need Port number for active Host name using java code

    User286465


      Hi All,

       

      I have tnsnames string and I know one of the following Host is working  say Primary-host .

       

      DESCRIPTION =(ADDRESS_LIST= (ADDRESS = (PROTOCOL = TCP)(HOST = Primary-host)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = Secondary-host)(PORT = 1522)))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = ORA112DB)))

       

      Could you please help me to get Port number of only primary Side ?. This needs to do because we cannot get port number using any oracle query.

       

      Thanks in advance

      JPrashant