Skip to content

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.3

PL/SQL procedure successfully completed.

Just a note.

-Marlon RIbunal

kick it on DotNetKicks.com

5 Comments leave one →
  1. February 23, 2011 11:32 AM

    THANKS…. IT HELPED ME IN ASP.NET(C#) CONNECTIVITY WITH ORACLE 10G

  2. sreenivasulu permalink
    August 19, 2010 11:12 AM

    i am searching more sites for my host name but no good ans.
    u r my best ans
    thank q

  3. Mohammad Al-Masri permalink
    December 12, 2009 3:05 AM

    Still oracle the best!!!

  4. Jack permalink
    February 11, 2009 5:18 PM

    helpful information.
    What is the command in sql plus or if I am to execute it from a stored procedure?

  5. Amit permalink
    June 25, 2008 4:25 AM

    Really good one , Thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

  • Archives



  • RSS SQLServerPedia

  • RSS SQL Crunch – Hot SQL Links

  • My Bookmarks

  • Category Cloud

    Business Career DBA Tool Events free ebook Humor IT News Members Only Microsoft MySQL Operating System Oracle Personal Reporting Services SQL Server SQLServerPedia Syndication SSC SSIS TSQL Tutorial Uncategorized Video


  • Software Blogs - BlogCatalog Blog Directory
  • Follow

    Get every new post delivered to your Inbox.