db: oracle 11.2 on windows
test user: scott
----
scott user have the following privilege:
execute on dbms_session .
create any context.
----
code profile:
create or replace context cont_scott using scott.cont_pkg1;
create or replace package cont_pkg1 is
procedure set_cont;
end;
create or replace package body cont_pkg1 is
procedure set_cont is
v_deptno number(4) ;
begin
DBMS_SESSION.set_context('CONT_SCOTT', 'DEPT_NO', '123');
end;
/
exec cont_pkg1.set_cont
SELECT SYS_CONTEXT('CONT_SCOTT ','DEPT_NO') FROM DUAL ;--- result is null . Why ?