ORA-01031,ORA-06512 dbms_session.set_context error [message #290237] |
Fri, 28 December 2007 02:53 |
krishna_900
Messages: 11 Registered: June 2005
|
Junior Member |
|
|
Hi All,
my senario is i have created a context from schema 'Schema1' using "accessed globally" option and created on package to set the values for conext. It is working fine.
When i deploy the same package on schema2 (remember the context is on schema1) and try to execute it on schema2 then it is giving me the following error. any help will be much appreciated.
attached the test package for reference.
Connected to:
Oracle Database 10g Release 10.2.0.1.0 - Production
SQL> exec krishna_pkg.MyProcedure
BEGIN krishna_pkg.MyProcedure; END;
*
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_SESSION", line 90
ORA-06512: at "LGE2008DEV.KRISHNA_PKG", line 6
ORA-06512: at line 1
|
|
|
|
|
|
|
|
|
|
Re: ORA-01031,ORA-06512 dbms_session.set_context error [message #290318 is a reply to message #290302] |
Fri, 28 December 2007 06:17 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
Another option is to make the context-name variable in the code. Set it in one single place and refer to that constant.
In cases where you want to share database-instances, you can rename one of the contexts, without having to alter too much code.
The associative array will cause PLSQL/SQL context switches, whereas it seems that calls to sys_context don't.
Bummer... why can I come up with this solution only for someone else??
[Updated on: Fri, 28 December 2007 06:18] Report message to a moderator
|
|
|
|
|
|
|
|
Re: ORA-01031,ORA-06512 dbms_session.set_context error [message #563842 is a reply to message #563686] |
Fri, 17 August 2012 08:02 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
Littlefoot wrote on Thu, 16 August 2012 09:36Michel's suggestion might be better than waiting for Krishna to answer your question as he last visited this Forum in Dec 2007.
I see the wheels turning in your head right now, trying to figure something out. Those same wheels are tuning in my head. Or maybe, it's only in my head and not yours.
|
|
|