Oracle Database - CURRENT_USER, SESSION_USER

Card Puncher Data Processing

About

When a session starts, CURRENT_USER has the same value as SESSION_USER and give the user id

How to

Get the current value

To get the current value of:

use the userenv CONTEXT as below:

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

Change it

CURRENT_USER cannot be changed programmatically, but it might change when a PL/SQL unit or a view is pushed onto, or popped from, the call stack.

You can still change the current schema





Discover More
Card Puncher Data Processing
Oracle Database - AUTHID

The AUTHID property of a stored PL/SQL unit affects the name resolution and privilege checking of SQL statements that the unit issues at run time. The AUTHID property does not affect compilation, and has...
Card Puncher Data Processing
Oracle Database - CURRENT_SCHEMA

When a session starts, CURRENT_SCHEMA has the value of the schema owned by SESSION_USER. To get the current value of CURRENT_SCHEMA, CURRENT_USER, or SESSION_USER, use the userenv context: CURRENT_SCHEMA...
Card Puncher Data Processing
Oracle Database - Userenv (Current Session Informations)

Userenv is a pre-build context that describes the current session. You can query the context Userenv with two functions. the SYS_CONTEXT...
Card Puncher Data Processing
SQL Plus - Show (System Variable) Command

The SHOW command shows the value of: a SQLPlus system variable or the current SQLPlus environment. SHOW SGA requires a DBA privileged login. where option represents one of the following: ...



Share this page:
Follow us:
Task Runner