View Current User in Oracle: 2 Easy Methods
To view the currently connected users, you can use one of the following methods:
- Use the statement SELECT USER FROM DUAL to query the current connected user.
- Retrieve the user from the DUAL table using SQL.
- Query the current connected user using the statement SELECT SYS_CONTEXT(‘USERENV’, ‘SESSION_USER’) FROM DUAL;
- Retrieve the current user session in SQL.
Both methods can retrieve the current user connected.