Easy way to Query Oracle Database for DB IP Address, Host Name and Instance Name

1/24/2011

Here's a handy SQL script to pull host name, instance name and IP Address ( of the primary interface).

SELECT A.HOST_NAME,A.INSTANCE_NAME,UTL_INADDR.GET_HOST_ADDRESS V$INSTANCE A;

Returns this

HOST_NAME            INSTANCE_NAME     GET_HOST_ADDRESS
-------------------------------------------------------
myhost.mydomain.com  foobar            10.10.10.88