title: Get service name,Port# and IP address of oracle 10g host
body: <p>I need to connect to Oracle 10g using sql developer. Currently i am able to connect using sql plus command from command line</p>
  
  <pre><code>sqlplus username/pwd@dbname
  </code></pre>
  
  <p>I need to find IP address/hostname, port#, servicename/sid from the current connection in sql plus.</p>
  
  <p>Found all information required other than port # using gv$session. In oracle 11 i found that port number can be found from gv$session. But not in 10g. Any other ways to figure it out?</p>
  
  <p>Anyways to figure out how to connect using sql developer? 
  Or atleast to know if i am even allowed to connect from remote to this server?</p>