ORA – 01031:, ORA – 06512:

Hello All,
I am writing a security package with a procedure.
I got a following TOAD Error message.
ORA – 01031: insufficient privileges
ORA – 06512: at “SYS.DBMS_SESSION”, line 90
ORA – 06512: at “PRJ.PRJ_SEC_PKG”, line 22
ORA – 06512: at line 2
What I am doing wrong?
Thanks,
NYC

Hi,
Capital of World  wrote:
Thank Guru Frank Kulash'
When I comment out following couple line, no more error.
DBMS_SESSION.SET_CONTEXT(‘PRJ_CTX’, ‘USER_NAME’, ‘V_PRJ_USERNAME’);
DBMS_SESSION.SET_CONTEXT(‘PRJ_CTX’, ‘USER_ROLE’, ‘V_PRJ_ROLE’);
If this involves set_context, is this the package named in the CREATE CONTEXT command?
According to my knowledge, answer is NO.Then that's the problem, unless this procedure is being called from that package.
Set_context can only be called by the trusted package. It can be called indirectly (that is, the trusted package can
(1) call set_context itself,
(2) call something else, that calls set_context,
(3) call something else, which calls yet another procedure, which calls set_context
... and so on.
The trusted package must always be in the calling stack when set_context is called.
Post the results of "SELECT * FROM all_context WHERE namespace = 'X';" where X is the namespace in question.
Please tell me more about the namespace.[CREATE CONTEXT in the SQL Language manual|http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_5002.htm#sthref5947] is a good place to start.
Are all the privileges you need granted directly to the package owner, and not just to some role?
How I can check it?Query the data dictionary view all_tab_privs.
In the case of EXECUTE privileges, the table_name column will contain the package (or function, or procedure) name.
Please give me example command to grant.
GRANT EXECUTE ON dbms_session TO capital;

Similar Messages

  • ORA-01031, ORA-01034 and ORA-27101 .....very urgent pls help.

    After I installed Oracle 8i Enterprise Edition on Win XP, default datanase was not creates so i tried manually creating it but it flashed this error while logging.
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\oracle>SQLPLUS
    SQL*Plus: Release 8.1.7.0.0 - Production on Wed Apr 30 20:09:50 2003
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    Enter user-name: INTERNAL
    Enter password:
    ERROR:
    ORA-01031: insufficient privileges
    Enter user-name: SYSTEM
    Enter password:
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist

    U r getting ORA-01034 and ORA-27101 because ur database has not started.
    try connecting svrmgrl as below
    go to command prompt
    svrmgrl
    connect internal
    startup pfile=<pfilename with full path>
    Now logon to sqlplus and try to connect as system.

  • ORA-01031,ORA-01033:

    Hi.,
    I took cold backup for cloning my database A.
    i was able to bring up my new database B.while i try to bring up my new database B i didnt comment out this line remote_login_passwordfile=EXCLUSIVE
    no i cannot bring up my database A and when i try to connect as
    sqlplus
    sys/***@A as sysdba
    Insufficient Privs
    Then i tried like
    sqlplus /nolog
    SQL&gt; connect / as sysdba
    ERROR:
    ORA-01031: insufficient privileges
    Pls help me to figure out the problems.now i cannot use 2 databases

    WIth remote_login_passwordfile=EXCLUSIVE you can't access more than one db!! You have to create the 2 password file for the 2 db using orapwd.
    Best,
    G

  • View, instead of trigger and ORA-01031

    Hello,
    I have a view based on outer joins like
    CREATE VIEW vt ( colV1, colV2, colV3, colV4, colV5, colV6, colV7, colV8 ) AS
    SELECT A.colA1, A.colA2, C.colB0, B.colB2, B.colB3, B.colB4, C.colC2, H.colH2
      FROM  tabA    A
           ,tabB    B
           ,tabC    C
           ,( SELECT  ...
                FROM   tabD  D
                      ,tabE  E
                WHERE  D.colD1 = E.colE1
             )  H                                
      WHERE A.colA1 = B.colB1
        AND LTRIM(B.colB2,'A') = LTRIM(C.colC1(+),'A')    
        AND B.colB3 = H.colH1(+); and an instead of trigger
    CREATE OR REPLACE TRIGGER vt_upd
      INSTEAD OF UPDATE ON vt
    BEGIN
      UPDATE    tabB
         SET    colB4 = :NEW.colV6
         WHERE  colB0 = :NEW.colV2;
    END;An now the problem: an update statement UPDATE vt set colV6=1 WHERE colV1=1; in SQL*Plus works as it should, but performing an update in APEX from a tabular or edit form shows an error: ORA-01031:ORA-01031: insufficient privileges, update...The strange thing: in both sessions there is the same user USER1 logged on !
    Why this difference ? Can anybody explain ?
    Regards,
    Heinz

    Hi Heinz,
    Your statement -
    what I wrote as table tabC in reality is a view to one table and one view in another schema.That'll be it, you need to grant explicit rights for the objects in that schema to the schema that is your parsing schema for your workspace.
    In other words, if you have -
    1) Workspace 'A' with parsing schema 'B'
    and you are trying to do -
    select foo from c.bar
    i.e. you're trying to query an object in schema 'C'.
    Then you need to (as a DBA or connected to schema C) -
    grant select on bar to b;Roles won't work (when used through APEX)...I can't say that any other way, you might find it works in SQLPlus with roles, but through APEX it won't...you need those explicit grants.
    Hope this makes sense.
    John.

  • Execute immediate on DBMS_METADATA.GET_DDL with error of ORA-01031: insufficient privileges

    I want to mirror a schema to a existing schema by creating DDL and recreate on the other schema with same name.
    I wrote the code below:
    create or replace
    PROCEDURE                                    SCHEMA_A."MAI__DWHMIRROR"
    AS
    v_sqlstatement CLOB:='bos';
    str varchar2(3999);
    BEGIN
      select
        replace(
          replace(replace(
          replace(DBMS_METADATA.GET_DDL('TABLE','XXXX','SCHEMA_A'),'(CLOB)',''),';','')
        ,'SCHEMA_A'
        ,'SCHEMA_B'
      into v_sqlstatement
      from dual;
      select  CAST(v_sqlstatement AS VARCHAR2(3999)) into str from dual;
      execute immediate ''||str;
    END;
    And Executing this block with below code:
    set serveroutput on
    begin
    SCHEMA_A.MAI__DWHMIRROR;
    end;
    But still getting the following error code:
    Error report:
    ORA-01031: insufficient privileges
    ORA-06512: at "SCHEMA_A.MAI__DWHMIRROR", line 47
    ORA-06512: at line 2
    01031. 00000 -  "insufficient privileges"
    *Cause:    An attempt was made to change the current username or password
               without the appropriate privilege. This error also occurs if
               attempting to install a database without the necessary operating
               system privileges.
               When Trusted Oracle is configure in DBMS MAC, this error may occur
               if the user was granted the necessary privilege at a higher label
               than the current login.
    *Action:   Ask the database administrator to perform the operation or grant
               the required privileges.
               For Trusted Oracle users getting this error although granted the
               the appropriate privilege at a higher label, ask the database
               administrator to regrant the privilege at the appropriate label.

    user5199319 wrote:
    USER has DBA Role
    when all  else fails Read The Fine Manual
    DBMS_METADATA

  • EXP-00008, ORA-06502 , ORA-06512 - Export Error

    We had done export of schema around 270gb..
    exp file=ops4sept.dmp log=ops4sept.log owner='OPS$BBCASHIN' statistics=none buffer=200000000
    The following error has come at the end
    EXP-00008: ORACLE error 6502 encountered
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "SYS.DBMS_SCHED_MAIN_EXPORT", line 351
    ORA-06512: at "SYS.DBMS_SCHED_JOB_EXPORT", line 14
    ORA-06512: at line 1
    EXP-00085: The previous problem occurred when calling SYS.DBMS_SCHED_JOB_EXPORT.create_exp for object 81203
    EXP-00008: ORACLE error 6502 encountered
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "SYS.DBMS_SCHED_MAIN_EXPORT", line 351
    ORA-06512: at "SYS.DBMS_SCHED_JOB_EXPORT", line 14
    ORA-06512: at line 1
    EXP-00085: The previous problem occurred when calling SYS.DBMS_SCHED_JOB_EXPORT.create_exp for object 81202
    . exporting post-schema procedural objects and actions
    . exporting statistics
    Export terminated successfully with warnings.

    EXP-00085 The previous problem occurred when calling string.string.string for
    object number
    Cause: The listed package provides export/import support for procedural
    objects, i.e., those whose DDL is supplied by stored procedures. The previously
    listed error occurred while calling the specified function.
    Action: Contact Oracle Support Services. Most packages are supplied by Oracle
    internal cartridge or server development groups. The package name will help
    Oracle Support Services determine the correct owner of the problem.
    Can you trace the session in order to find out the ORA-01031 problem, which could be a missing grant on a table or system privilege

  • Wwv_flow.accept HTTP-404 ORA-01031

    Hi ... I am running APEX 3.0 ...I was having trouble uploading images in my applications and to test whether it was my apps or not, I created a new workspace with the standard sample application - which gives the same error as in my apps.
    The error appears when I attempt to upload an image. The apache error log entries for this error are the following:
    [Sat May 19 12:28:07 2007] [error] [client 127.0.0.1] [ecid: 1179595687:***.168.2.127:4272:4248:1,0] mod_plsql: /stage/wwv_flow.accept HTTP-404 ORA-01031: insufficient privileges\n
    [Sat May 19 12:29:52 2007] [error] [client 192.168.2.103] [ecid: 1179595792:***.168.2:4272:3064:13,0] mod_plsql: /stage/p HTTP-404 ORA-01403: no data found\nORA-06512: at "FLOWS_030000.WWV_FLOW_FILE_MGR", line 96\nORA-06512: at "FLOWS_030000.P", line 26\nORA-06512: at line 22\n
    The forums expert assistance will be highly appreciated ...
    Thanks
    Pter

    Pierre,
    Can you show us the block of code that is failing? The error message says it's getting a 1403 in the "p" procedure. That procedure is used for downloading, not uploading.
    Scott

  • Data Load is erroring out with ORA-12801 ORA-01031

    Hello,
    I am having Oracle 11.1.0.7 on AIX and we are loading data through Informatica.
    There are 7 tables in the database that are big and we enabled parallelism with the degree of 2.
    When we run the informatica session for loading data the session is failing with the error -
    Severity     Timestamp     Node     Thread     Message Code     Message
    ERROR     5/10/2011 4:33:09 PM     node01_wpg1pedw001     POST-SESS     TM_6159     An error occurred executing the stored procedure.
    TM_6159 [4294965496] [
    ORA-12801: error signaled in parallel query server P000
    ORA-01031: insufficient privileges
    ORA-06512: at "POL_ODS.DELETE_LATEST_POLICY_1", line 4
    ORA-06512: at line 2
    Database driver error...
    Function Name : ExecuteSP
    Oracle Fatal Error
    Database driver error...
    Function Name : ExecuteSP
    Oracle Fatal Error]Trace file is giving me this output -
    =====================
    PARSING IN CURSOR #3 len=152 dep=1 uid=73 oct=7 lid=73 tim=2806650507771 hv=2692072913 ad='700000b32b206c0' sqlid='835qyt2h7bjfj'
    DELETE FROM LIENHOLDER WHERE LIEN_POLICY_12_SEGMENT_ID IN (SELECT POL_SEG_12_ID FROM POLICY12SEGMENT WHERE POLICY_ID IN (SELECT POLICY_ID FROM DEL_POL))
    END OF STMT
    PARSE #3:c=20000,e=31779,p=0,cr=181,cu=3,mis=1,r=0,dep=1,og=1,plh=449661848,tim=2806650507771
    kxfpgsg
            Error 12801 encountered
    EXEC #3:c=10000,e=111135,p=0,cr=28,cu=0,mis=0,r=0,dep=1,og=1,plh=449661848,tim=2806650618906
    ERROR #3:err=12801 tim=2806650618906
    STAT #3 id=1 cnt=0 pid=0 pos=1 obj=0 op='DELETE  LIENHOLDER (cr=0 pr=0 pw=0 time=0 us)'
    STAT #3 id=2 cnt=0 pid=1 pos=1 obj=0 op='PX COORDINATOR  (cr=0 pr=0 pw=0 time=0 us)'
    STAT #3 id=3 cnt=0 pid=2 pos=1 obj=0 op='PX SEND QC (RANDOM) :TQ10002 (cr=0 pr=0 pw=0 time=0 us cost=95123 size=6011574 card=117874)'
    STAT #3 id=4 cnt=0 pid=3 pos=1 obj=0 op='HASH JOIN RIGHT SEMI (cr=0 pr=0 pw=0 time=0 us cost=95123 size=6011574 card=117874)'
    STAT #3 id=5 cnt=0 pid=4 pos=1 obj=0 op='PX RECEIVE  (cr=0 pr=0 pw=0 time=0 us cost=88665 size=1472328 card=113256)'
    STAT #3 id=6 cnt=0 pid=5 pos=1 obj=0 op='PX SEND BROADCAST :TQ10001 (cr=0 pr=0 pw=0 time=0 us cost=88665 size=1472328 card=113256)'
    STAT #3 id=7 cnt=0 pid=6 pos=1 obj=0 op='VIEW  VW_NSO_1 (cr=0 pr=0 pw=0 time=0 us cost=88665 size=1472328 card=113256)'
    STAT #3 id=8 cnt=0 pid=7 pos=1 obj=0 op='HASH JOIN  (cr=0 pr=0 pw=0 time=0 us cost=88665 size=1925352 card=113256)'
    STAT #3 id=9 cnt=0 pid=8 pos=1 obj=0 op='BUFFER SORT (cr=0 pr=0 pw=0 time=0 us)'
    STAT #3 id=10 cnt=0 pid=9 pos=1 obj=0 op='PX RECEIVE  (cr=0 pr=0 pw=0 time=0 us cost=27 size=314700 card=62940)'
    STAT #3 id=11 cnt=0 pid=10 pos=1 obj=0 op='PX SEND BROADCAST :TQ10000 (cr=0 pr=0 pw=0 time=0 us cost=27 size=314700 card=62940)'
    STAT #3 id=12 cnt=0 pid=11 pos=1 obj=55756 op='TABLE ACCESS FULL DEL_POL (cr=0 pr=0 pw=0 time=0 us cost=27 size=314700 card=62940)'
    STAT #3 id=13 cnt=0 pid=8 pos=2 obj=0 op='PX BLOCK ITERATOR (cr=0 pr=0 pw=0 time=0 us cost=88594 size=160428864 card=13369072)'
    STAT #3 id=14 cnt=0 pid=13 pos=1 obj=70801 op='TABLE ACCESS FULL POLICY12SEGMENT (cr=0 pr=0 pw=0 time=0 us cost=88594 size=160428864 card=13369072)'
    STAT #3 id=15 cnt=0 pid=4 pos=2 obj=0 op='PX BLOCK ITERATOR (cr=0 pr=0 pw=0 time=0 us cost=6434 size=265286208 card=6981216)'
    STAT #3 id=16 cnt=0 pid=15 pos=1 obj=70798 op='TABLE ACCESS FULL LIENHOLDER (cr=0 pr=0 pw=0 time=0 us cost=6434 size=265286208 card=6981216)'
    CLOSE #3:c=0,e=0,dep=1,type=0,tim=2806650618906
    EXEC #2:c=30000,e=142914,p=0,cr=209,cu=3,mis=0,r=0,dep=0,og=1,plh=0,tim=2806650618906
    ERROR #2:err=12801 tim=2806650618906
    =====================The Table LIENHOLDER is not set for parallelism and is not amount 7 of those tables. But even when we enabled parallelism with degree of 2 on LIENHOLDER, it is still thowing out this error message.
    I have granted DBA role to POL_ODS who owns this procedure POL_ODS.DELETE_LATEST_POLICY_1.
    Waiting for your inputs and hope to hear from the Oracle & Informatica experts soon.
    Thanks!

    Thanks for your reply Karluk & hoek.
    Just to let you know, we are encountering this problem when I enable parallelism on the 7 tables.
    TABLE_NAME                     DEGREE
    POLICY30SEGMENT                         2
    POLICY03SEGMENT                         2
    POLICY                                  2
    POLICY12SEGMENT                         2
    POLICY35SEGMENT                         2
    POLICY45SEGMENT                         2
    VEHICLECOVERAGE                         2Proc DELETE_LATEST_POLICY_1 is owned by POL_ODS and this job is run by POL_ODS itself. This PROC does delete. Yes, LEINHOLDER is owned by POL_ODS only so there is no need to grant DELETE on this table to it's own schema.
    As stated in my the trace file, the DELETE statement that it was running was -
    DELETE FROM LIENHOLDER WHERE LIEN_POLICY_12_SEGMENT_ID IN (SELECT POL_SEG_12_ID FROM POLICY12SEGMENT WHERE POLICY_ID IN (SELECT POLICY_ID FROM DEL_POL))In this POLICY12SEGMENT is enabled for parallelism but not LIENHOLDER or DEL_POL.
    If I don't have parallelism on these 7 tables then the PROC runs fine and it does the delete as expected.
    Hope I am clear this time.
    Thanks for your time Guys!
    Edited by: user608897 on May 10, 2011 6:32 PM

  • ORA-01031 in OWB deployment

    Dear all,
    My question ist following:
    1. I imported a flate file and assign it to externaal table. Everything is fine. If i try to read the content of external table getting error message:
    ORA-00942 (table or view does not exists).
    Question: Which priviledge must give to the staging user. I gave him also grant select any table to target_user from sysdba side, but error stay the same.
    I will be appreciate getting reponse from you.
    Thans in advance

    Hi david,
    Look at this error message after deployment:
    Name
    Action
    Status
    Log
    None
    Error
    ORA-01031: insufficient privileges
    ORA-06512: at "REPOS_USER.WB_RT_TARGET_SCHEMA_OBJS", line 13
    ORA-06512: at "REPOS_USER.WB_RT_TARGET_SCHEMA_OBJS", line 109
    ORA-06512: at line 1
    RCP_FF_LOCATION2
    Create
    Error
    ORA-01031: insufficient privileges ----->>>>>> What privilege must give them in addition
    RCP_EXT
    Create
    Error
    ORA-06564: object RCP_FF_LOCATION2 does not exist --->>>> This location exists exactly.
    I dont know since wwhen we must give gratnt to access directory to user????. If eveything should be implemented manually, what is the need of OWB?.
    Regards Mehdi

  • ORA-01031: insufficient privileges  when attempting to run a proc

    I have a procedure called KILL_MY_SESSION that is defined with an AUTHID of DEFINER
    The procedure owned by schema JOHN. The procedure makes several calls to DBMS_SQL PL/SQL package.
    The last thing the procedure does with DBMS_SQL is issue an ALTER SYSTEM KILL SESSION statement.
    Schema JOHN has the privileges to kill a session in the database.
    If I log into the schema JOHN, I can successfully issue the ALTER SYSTEM KILL SESSION statement.
    Also, while logged into the JOHN schema, I can successfully run the KILL_MY_SESSION procedure.
    Now I have schema OITS. I've granted OITS the EXECUTE privilege on the JOHN.KILL_MY_SESSION procedure.
    Since JOHN.KILL_MY_SESSION is a DEFINERs rights privilege, shouldn't OITS be able to run the procedure successfully and kill a session?
    Here is some output from the OITS session when attempting to execute JOHN.KILL_MY_SESSION:
    SQL> conn oifs@dbname
    Enter password: ********
    Connected.
    SQL> set lines 500
    SQL> select username, osuser, sid, serial#
    2 from v$session
    3 where username = 'OIFS';
    USERNAME OSUSER SID SERIAL#
    OIFS Administrator 142 325
    OIFS Administrator 139 613
    SQL> exec john.kill_my_session('142', '325')
    BEGIN john.kill_my_session('142', '325'); END;
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "SYS.DBMS_SYS_SQL", line 1204
    ORA-06512: at "SYS.DBMS_SQL", line 323
    ORA-06512: at "EIADBA.KILL_MY_SESSION", line 20
    ORA-06512: at line 1
    Anyone have a clue as to what I'm doing wrong?
    From the DBA_PROCEDURES view, here is the record for KILL_MY_SESSION
    OWNER
    OBJECT_NAME
    OBJECT_TYPE AUTHID
    JOHN
    KILL_MY_SESSION
    PROCEDURE DEFINER

    Hi,
    JSebastian wrote:
    No the EXECUTE privilege is granted directly to OITS
    SQL> select grantee,owner,table_name,privilege from dba_tab_privs where table_name = 'KILL_MY_SESSION';
    GRANTEE OWNER
    TABLE_NAME PRIVILEGE
    OIFS JOHN
    KILL_MY_SESSION EXECUTEActually, Fsitja was asking about John's privileges. Are the privileges John needs granted directly to John (which is required), or merely to some role that John has (which will not help in a strored procedure)?
    You may need to grant the privileges to John WITH ADMIN OPTION (or WITH GRANT OPTION for object privileges), if John is to grant others EXECUTE privileges on the procedure.
    Whenever you have a problem, it helps if you post a complete test script that re-creates the problem.
    In this case, include
    (1) All relevant GRANT statements
    (2) the full code of kill_my_session (or a simplified version, that gets the same error)
    (3) how John calls it (sucessfully)
    (4) how OITS calls it (unsucessfully)

  • Facing error (ORA-01031: insufficient privileges)

    Hi All,
    I am facing a strange error as mentioned in the subject.
    I googled and found that I dont have proper privileges to execute.
    But my scenario is as follows
    BEGIN
    EXECUTE IMMEDIATE 'CREATE TABLE TEST1(X NUMBER)';
    END;
    PL/SQL procedure successfully completed.
    CREATE PROCEDURE PR_TEST
    IS
    BEGIN
    EXECUTE IMMEDIATE 'CREATE TABLE TEST2(X NUMBER)';
    END;
    EXEC PR_TEST;
    ORA-01031: insufficient privileges
    ORA-06512: at "SCMSA_HIST.PR_TEST", line 4
    ORA-06512: at line 1
    Appreicate your valuable response.
    Thanks,
    MK.

    Maddy wrote:
    I googled and found that I dont have proper privileges to execute.
    It is good that you have found the cause of issue. So, did you give proper privileges to resolve the error?
    What is that you expect from the Forums?
    Just give "Grant Create table to user" and resolve the issue. :)
    Just wanted to add, Creating Objects on-the-go is not a very good approach.
    Another, you might want to handle the exception, in case the Table/Object already exists. Else your Code Execution may be interrupted (Just with the thought that you may have code following the Dynamic Create Table statement; If you do not have then no issues.)
    Edited by: Purvesh K on Jul 27, 2012 10:36 AM

  • ORA-01031 while executing a procedure with the owner

    I'm Trying to execute a procedure shipment_sequence which is under the ps_user user but i keep getting ORA-01031.
    Please suggest what should be done to counter this.
    Regards,
    Ankit

    create or replace Procedure shipment_sequence
    l_seq_start_with IN NUMBER,
    maxvalue IN NUMBER, event_identifier out SYS_REFCURSOR)
    is
    begin
    begin
    execute immediate 'DROP SEQUENCE SHIPMENT_SEQ';
    exception
    when others then null;
    end;
    execute immediate
    'CREATE SEQUENCE SHIPMENT_SEQ START WITH '
    ||to_char(l_seq_start_with)
    ||' MAXVALUE '||to_char(maxvalue)||' MINVALUE 1 CACHE 20 INCREMENT BY 1';
    OPEN event_identifier FOR select * from dual;
    end;
    Oracle version: 11.1.0.7
    execution: VAR rc REFCURSOR
    EXEC shipment_sequence(961000000,961100000, :rc);
    print rc;
    Error Message:
    Error starting at line 2 in command:
    EXEC shipment_sequence(961000000,961100000, :rc);
    Error report:
    ORA-01031: insufficient privileges
    ORA-06512: at "PS_USER.SHIPMENT_SEQUENCE", line 12
    ORA-06512: at line 1
    01031. 00000 - "insufficient privileges"
    *Cause:    An attempt was made to change the current username or password
    without the appropriate privilege. This error also occurs if
    attempting to install a database without the necessary operating
    system privileges.
    When Trusted Oracle is configure in DBMS MAC, this error may occur
    if the user was granted the necessary privilege at a higher label
    than the current login.
    *Action:   Ask the database administrator to perform the operation or grant
    the required privileges.
    For Trusted Oracle users getting this error although granted the
    the appropriate privilege at a higher label, ask the database
    administrator to regrant the privilege at the appropriate label.
    rc
    Let me know if you need any more information.
    Regards,
    Ankit

  • ORA-01031 Error; please help

    hai, iam getting a strange error,
    i have this procedure which is created successfully. but giving me insufficient privileges message inserted into error log.
    Also when iam writing the create table statement individually, it is creating a table.
    create table ACTIVITIES as select * from ACTIVITIES@x_old;
    i have dba privilege on the current database
    create or replace procedure get_old_tab_scr
    is
    lv_msg varchar2(500);
    lv_code number(10);
    begin
    for i in (select table_name from user_tables@x_old)
    loop
    execute immediate 'create table '||i.table_name||' as select * from '||i.table_name||'@x_old';
    dbms_output.put_line('create table '||i.table_name||' as select * from '||i.table_name||'@x_old');
    end loop;
    exception
    when others then
    lv_code := sqlcode;
    lv_msg := sqlerrm;
    insert into error_log values('get_old_tab_scr -'||sysdate||lv_code||'-'||lv_msg);
    end;
    can i get some help regarding this...

    Purpose:
    ~~~~~~~~
    Purpose of the document is to show the limitations of roles and privileges under
    PL/SQL.
    Due to these limitations, you may get errors in PL/SQL procedures/packages when
    accessing certain objects or packages, but the same code works in SQL*Plus
    The flagged errors are ORA-00942 or ORA-01933 or ORA-01031 and ORA-06512 or
    PLS-00201 and ORA-06550 or ORA-28111 with Fine Grained Auditing (FGA)
    Note that the generated errors may differ in each release.
    Explanation:
    ~~~~~~~~~~~~
    The fundamental misunderstanding with these problems is because of the misconception
    that roles that are granted to one user can be applied to another by intermediate
    objects such as views or pl/sql procedures, this is not possible, roles exist in
    sessions and are associated with a user in an active session only, the privileges
    of a role can not be transferred to objects.
    If you're accessing tables/views in PL/SQL procedure or package and getting
    either ORA-1031 or ORA-942 (or PLS-201), but the same select/update/insert/delete
    works ok on SQL*Plus, then you need to check if the privileges have been granted
    to the user creating the procedure via a role.
    Privileges granted via role are disabled inside stored procedures
    Detailed case studies follow:

  • Ctxsys.context index creation :ORA-01031: insufficient privileges on sys.XMLType

    Hi,
    in the following enviroment:
    Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production
    With the Partitioning option
    JServer Release 9.0.1.1.1 - Production
    On an MS 2K box
    I experience the following problem:
    if I create a table
    create table test(c type);
    where type is varchar2 o clob I then succesfully issue this
    command:
    create index test_ctx on test(c) indextype is ctxsys.context;
    but if type is sys.XMLType I get :
    ORA-01031: insufficient privileges.
    Any suggestion
    Thanks
    Alex

    Under user sys as sysdba the following happens:
    SQL> create table test(c XMLType);
    Table created.
    SQL> create index test_ctx on test(c) indextype is
    ctxsys.context;
    create index test_ctx on test(c) indextype is ctxsys.context
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE
    routine
    ORA-20000: Oracle Text error:
    DRG-50857: oracle error in drixtab.create_index_tables
    ORA-00955: name is already used by an existing object
    ORA-06512: at "CTXSYS.DRUE", line 157
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 176

  • ORA-01031: insufficient privileges for "SYS.DBMS_TRANSACTION"...FIX???

    Connected to Oracle Database 11g Enterprise Edition Release 11.1.0.7.0
    Connected as SYS
    SQL> exec admin.admin_dba_main.KILL_ORPH_2PHASE_COMMITS();
    begin admin.admin_dba_main.KILL_ORPH_2PHASE_COMMITS(); end;
    ORA-01031: insufficient privileges
    ORA-06512: at "SYS.DBMS_TRANSACTION", line 88
    ORA-06512: at "ADMIN.ADMIN_DBA_MAIN", line 52I create this as the sys user but the owner of it is a schema called admin that owns several of our DBA scripts. The ADMIN schema has the DBA role, but as far I understand it, the SYS.DBMS_TRANSACTION needs to be run as either SYS or a SYSDBA user.
    What am I missing here. What permission do I have to grant to get this working?

    Hello,
    This post is duplicated:
    ORA-01031: insufficient privileges for "SYS.DBMS_TRANSACTION"...FIX???
    Best regards,
    Jean-Valentin

Maybe you are looking for