How to get IP Address , Computer Name,Database User, Oracle, Database user ID, Database Name n Oracle?

You can get IP Address , Computer Name,Database User, Oracle, Database user ID, Database Name n Oracle by using these commands;

SELECT
UPPER(GET_CONTEXT_VALUE(‘TERMINAL’)) COMPUTER_NAME
FROM DUAL;

SELECT
UPPER(GET_CONTEXT_VALUE(‘SESSION_USER’)) ORACLE_USER_NAME
FROM DUAL;

SELECT
UID ORACLE_USER_ID
FROM DUAL;

SELECT
UPPER(GET_CONTEXT_VALUE(‘OS_USER’)) OS_USER_NAME
FROM DUAL;

SELECT
SYS_CONTEXT(‘USERENV’,’IP_ADDRESS’) IP_ADDRESS
FROM DUAL;
SELECT
HOST_NAME DB_NAME
FROM V$INSTANCE;