GET HOST NAME & IP IN ORACLE 10G
Use the Oracle 10g utility “UTL_INADDR” to get the Local Host Name and IP of the machine your Oracle 10g is running on. You can do this by executing the following commands:
SQL> SET serveroutput on
2 DBMS_OUTPUT.PUT_LINE(UTL_INADDR.GET_HOST_NAME); — Local machine/host name
3 DBMS_OUTPUT.PUT_LINE(UTL_INADDR.GET_HOST_ADDRESS); — IP address of host
PL/SQL procedure successfully completed.
Just a note.