Wednesday, December 23, 2009

How to get server ip address in oracle

how to get server ip address in oracle
================================
1. For IP Address

SELECT UTL_INADDR.get_host_address
FROM DUAL

2. For Host Name

SELECT UTL_INADDR.get_host_name
FROM DUAL

3. For Domain and host name

SELECT sys_context('USERENV', 'HOST')
FROM dual;

4. For host name

SELECT sys_context('USERENV', 'SERVER_HOST')
FROM dual;

No comments: