Oracle – Get IP Address and Host Name

With UTL_INADDR The UTL_INADDR package provides a PL/SQL procedure to support internet addressing. It provides an API to retrieve host names and IP addresses of local and remote hosts. Example select UTL_INADDR.GET_HOST_NAME Host_Name, UTL_INADDR.GET_HOST_ADDRESS IP_Address from dual ; With SYS_CONTEXT SYS_CONTEXT returns the value of parameter associated with the context namespace. You can use this function in both SQL and PL/SQL statements Example select SYS_CONTEXT('USERENV', 'IP_ADDRESS') IPAddress from dual; select SYS_CONTEXT('USERENV', 'HOST') HostName from dual; For more detail one can

» Read more