SQL> --
SQL>
SQL> create or replace procedure invoker_proc AUTHID CURRENT_USER as
2 begin
3 for x in ( select sys_context( 'userenv', 'current_user' ) current_user,
4 sys_context( 'userenv', 'session_user' ) session_user,
5 sys_context( 'userenv', 'current_schema' ) current_schema
6 from dual )
7 loop
8 dbms_output.put_line( 'Current User: ' || x.current_user );
9 dbms_output.put_line( 'Session User: ' || x.session_user );
10 dbms_output.put_line( 'Current Schema: ' || x.current_schema );
11 end loop;
12 end;
13 /
Procedure created.
SQL>
|