ORA-01031: insufficient privileges
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: ORA-01031: insufficient privileges

Hybrid View

  1. #1
    Join Date
    Nov 2000
    Posts
    440

    ORA-01031: insufficient privileges

    Situation 1 :

    SQL> ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 12';

    Session altered.



    works fine.

    Situation 2 :

    SQL> begin
    2 execute immediate 'ALTER SESSION SET EVENTS ''10046 TRACE NAME CONTEXT FOREVER, LEVEL 12''';
    3 end;
    4 /

    PL/SQL procedure successfully completed.


    works fine.

    Situation 3 :

    SQL> CREATE OR REPLACE Package GSY_general_4 as
    2 procedure trace_on;
    3 End GSY_general_4;
    4 /

    Package created.

    SQL> CREATE OR REPLACE Package body GSY_general_4 as
    2
    3 procedure trace_on is
    4 begin
    5 execute immediate 'ALTER SESSION SET EVENTS ''10046 TRACE NAME CONTEXT FOREVER, LEVEL 12''';
    6 end trace_on;
    7
    8 End GSY_general_4;
    9 /

    Package body created.

    SQL> execute gsy_general_4.trace_on;
    BEGIN gsy_general_4.trace_on; END;

    *
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "DEMO40.GSY_GENERAL_4", line 5
    ORA-06512: at line 1

    Gives me that error

    Question: Why?

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    you're getting the priv through a role. you have to have it directly to create a package...
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  3. #3
    Join Date
    Nov 2000
    Posts
    440
    what do i have to grant?

  4. #4
    Join Date
    Nov 2000
    Posts
    440
    ok it works, i grant create session to my user. thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width