Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: translate an ip

RE: translate an ip

From: Kerber, Andrew W. <>
Date: Wed, 29 Aug 2007 09:22:08 -0500
Message-ID: <>

I tracked it down, thanks for asking. The function was returning multiple oracle error messages, not just the does not exist message. I had to use a when others...  

-----Original Message-----
[] On Behalf Of Jared Still Sent: Wednesday, August 29, 2007 8:58 AM To:
Cc: Oracle Discussion List
Subject: Re: translate an ip  

On 8/28/07, Andrew Kerber <> wrote:

        Hello experts,         

        I am trying to build a function to translate an IP address into its name, or vice versa. I have a mixed bag of IP addresses and DNS names, all culled from AUD$ history tables. What I need is a consistent format, either IP or DNS name, so I can consolidate the information. I am trying to use utl_inaddr.get_host_name. It works, but if it encounters an IP that it can't translate, my SQL statement fails. The same for using utl_inaddr.get_host_address. What I have so far is below. It compiles, but it doesn't catch the error. What I need is something that will either translate the address, or else return the original value. I would appreciate any help you might have to offer.

What is the nature of the failure?

IP or hostname that no longer exists?

Or something else?

Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist 

NOTICE:  This electronic mail message and any attached files are confidential.  The information is exclusively for the use of the individual or entity intended as the recipient.  If you are not the intended recipient, any use, copying, printing, reviewing, retention, disclosure, distribution or forwarding of the message or any attached file is not authorized and is strictly prohibited.  If you have received this electronic mail message in error, please advise the sender by reply electronic mail immediately and permanently delete the original transmission, any attachments and any copies of this message from your computer system. Thank you.


Received on Wed Aug 29 2007 - 09:22:08 CDT

Original text of this message