This content has been marked as final. Show 4 replies
You need to first execute the below statement:
create context empno_ctx using SET_EMPNO_CTX_PROC
I hope this solution will resolve this problem.
UserMB wrote:Don't create objects in SYS, it's really a bad practice and all around horrible idea.
under user SYS i created the following procedure:
create or replace PROCEDURE SET_EMPNO_CTX_PROC(emp_value IN VARCHAR2) AS
DBMS_SESSION.SET_CONTEXT('empno_ctx', 'empno_attrib', emp_value);
when i run the following in sqlplus: exec set_empno_ctx_proc('42738');
i get the following error:
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_SESSION", line 94
ORA-06512: at "SYS.SET_EMPNO_CTX_PROC", line 3
ORA-06512: at line 6
anyone knows who to resolve that?
id appreciate any tips
Edited by: UserMB on Jun 12, 2011 6:59 AM
Create a new user if you need, then create the CONTEXT and procedure in that schema.
i only did that to check if i would have the error also under sys;
normally i created all under my own user, but then i had 'insufficient privelelges' error;
it worked fine