SELECT
SYS_CONTEXT ( 'USERENV', 'DB_NAME' ) DB_NAME,
SYS_CONTEXT ( 'USERENV', 'SESSION_USER' ) USER_NAME,
SYS_CONTEXT ( 'USERENV', 'SERVER_HOST' ) DB_HOST,
SYS_CONTEXT ( 'USERENV', 'HOST' ) USER_HOST
FROM DUAL;
SELECT
UTL_INADDR.GET_HOST_ADDRESS, -- get local IP addr
UTL_INADDR.GET_HOST_NAME -- get local host name
FROM DUAL;
SELECT PROGRAM FROM V$SESSION WHERE PROGRAM LIKE '%(PMON)%';
SELECT HOST_NAME FROM V$INSTANCE;