GET HOST NAME & IP IN ORACLE 10G
May 11, 2008
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
SQL> BEGIN
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
4 END;
5 /
DEVSTATION
192.168.1.3PL/SQL procedure successfully completed.
Just a note.
-Marlon RIbunal
5 Comments
leave one →




















THANKS…. IT HELPED ME IN ASP.NET(C#) CONNECTIVITY WITH ORACLE 10G
i am searching more sites for my host name but no good ans.
u r my best ans
thank q
Still oracle the best!!!
helpful information.
What is the command in sql plus or if I am to execute it from a stored procedure?
Really good one , Thanks.