How to Check Which User is Connected to Current Oracle Session? 3 different methods

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
There are three different simple ways to identify the current user session in oracle sqlplus.
1.     Using DBMS_UTILITY. OLD_CURRENT_USER function.

select DBMS_UTILITY.OLD_CURRENT_USER from dual;
SQL> /

OLD_CURRENT_USER

-----------------
STHOMAS

2.     SQL*Plus command – Show user


SQL> show user
USER is "STHOMAS"

3.     Using SYS_CONTEXT function
SQL> select SYS_CONTEXT ('USERENV', 'CURRENT_USER') from dual;

SYS_CONTEXT('USERENV','CURRENT_USER')
--------------------------------------

STHOMAS

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer