DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: pl/sql question

  1. #1
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334

    pl/sql question

    got this procedure on 9iR2

    Code:
    create or replace procedure dave_test (p_user_id IN varchar2)
    AUTHID CURRENT_USER as
    begin
    dbms_resource_manager_privs.grant_switch_consumer_group (p_user_id,'users1',TRUE);
    dbms_resource_manager.set_initial_consumer_group(p_user_id,'users1');
    end;
    I have execute on the dbms_resource* packages and it works.

    now when I do this, i get erros

    Code:
    SQL> connect / as sysdba
    Connected.
    SQL> grant execute on dbms_resource_manager_privs to hangdam;
    
    Grant succeeded.
    
    SQL> grant execute on dbms_resource_manager to hangdam;
    
    Grant succeeded.
    
    SQL> grant execute on cerebrus.dave_test to hangdam;
    
    Grant succeeded.
    
    SQL> conn hangdam/cerebrus
    Connected.
    
    SQL> exec cerebrus.dave_test('ds');
    BEGIN cerebrus.dave_test('ds'); END;
    
    *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "SYS.DBMS_RMIN", line 56
    ORA-06512: at "SYS.DBMS_RESOURCE_MANAGER_PRIVS", line 99
    ORA-06512: at "CEREBRUS.DAVE_TEST", line 4
    ORA-06512: at line 1
    Anyone know how I can it to work when running it not as the procedure owner?

    Cheers

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    tried it with AUTHID DEFINER as well, doesnt worj then either.

    Any ideas?

  3. #3
    Join Date
    Dec 2000
    Posts
    138
    From the docs@tahiti.oracle.com

    Requirements
    The invoker must have the ADMINISTER_RESOURCE_MANAGER system privilege to execute these procedures. The procedures to grant and revoke this privilege are in the package DBMS_RESOURCE_MANAGER_PRIVS.
    HTH
    -dharma

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    yeah cheers, found that after much searching about - it got hidden for some sers having the dba privelege.

    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