Help - Search - Members - Calendar
Full Version: Ora-1031 Insufficient Privileges,Ora-06512 SYS.DBMS_Session
Oracle DBA Forums > Oracle > Oracle Forum
Pavs
Hi

My application is throwing the below mentioned error,when i am trying to open a tab in the application. 'A' is the schema name and the schema has the required privileges and grants. Please find below the code snippet of the package and the procedure. Request you to help me on finding what could be the exact cause of the issue

CODE
System.Data.OracleClient.OracleException: ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_SESSION", line 101
ORA-06512: at "A.Example", line 5
*ORA-06512: at "A.Test", line 18*Package Code

create or replace PACKAGE BODY Example IS
PROCEDURE set_parameter (p_name IN VARCHAR2,
p_value IN VARCHAR2) IS
BEGIN
DBMS_SESSION.set_context('parameter', p_name, p_value);
END set_parameter;

END Example;
Procedure COde
------------------------------

Procedure --- Test
create or replace PROCEDURE Test(USERNAME IN VARCHAR, USERTYPE IN VARCHAR, FILTER IN CLOB, SELECTEDCOLUMNS IN VARCHAR, OUTCURSOR OUT TYPES.CURSORTYPE, OUTINVIEWCOUNT OUT TYPES.CURSORTYPE) AS
SEARCHSTRING VARCHAR2(30);
QUERYSQL VARCHAR2(32767);
PARAMLIST VARCHAR2(32767);
COUNTSQL VARCHAR2(32767);
FILTERID VARCHAR(3);
WHERESQL VARCHAR(32767);
TOTALFILTERITEM NUMBER(10, 0);
MAINID NUMBER;
DETAILSID NUMBER;

BEGIN

IF FILTER IS NOT NULL THEN
GETFILTERDETAILS(XMLDOC => XMLTYPE(FILTER), ID => FILTERID, SEARCH => SEARCHSTRING);
END IF;

**Example.SET_PARAMETER('USERNAME', USERNAME);**
**Example.SET_PARAMETER('USERTYPE', USERTYPE);**
burleson
Hi,

"Test" may be a reserved work, try another name, like mytest . . .


>> Request you to help me on finding what could be the exact cause of the issue

Sorry, this is a DBA forum, we don't have the resoucres to provide tech support here.

I would contact Oracle tech support, just call 800-223-1711.

It looks like a permission issue.

To test it:

- grant execute on mytest to public

- rr-run it, connected as SYSDBA

http://www.dba-oracle.com/t_ora_01031.htm

Good Luck!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.