Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: quick pl/sql question

RE: quick pl/sql question

From: David Sharples <dsharples_at_cerebrussolutions.com>
Date: Wed, 21 Apr 2004 17:17:26 +0100
Message-ID: <EA29A3FCC723674293FD6286D3F0513E629EAD@louis.cerebrus.com>


Thanks but.

SQL> connect / as sysdba
Connected.
SQL> grant execute on dbms_resource_manager to cerebrus;

Grant succeeded.

SQL> grant execute on dbms_resource_manager_privs to cerebrus;

Grant succeeded

SQL> connect cerebrus/cerebrus
Connected.

SQL> exec dave_test('ds');
BEGIN 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 3
ORA-06512: at line 1

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Karniotis, Stephen Sent: 21 April 2004 17:07
To: 'oracle-l_at_freelists.org'
Subject: RE: quick pl/sql question

Dave:

  Not sure, but it appears that you may not have the correct privileges to
use the DBMS procedures within a created procedure. You may have to grant
additional access on this procedure to accomplish what you need. Just a thought.

Thank You

Stephen P. Karniotis
Compuware Corporation
Direct: (313) 227-4350
Toll Free: (800) 462-7740 ext. 74350

Mobile:	(248) 408-2918
Email:	Stephen.Karniotis_at_Compuware.com=20
Web:	www.compuware.com=20

 -----Original Message-----
From: 	oracle-l-bounce_at_freelists.org

[mailto:oracle-l-bounce_at_freelists.org]
On Behalf Of David Sharples
Sent:	Wednesday, April 21, 2004 12:06 PM
To:	oracle-l_at_freelists.org
Subject:	quick pl/sql question

Got this simple proc
SQL> create or replace procedure dave_test (p_user_id IN varchar2) as=20

    begin=20
=20
dbms_resource_manager_privs.grant_switch_consumer_group(p_user_id,'users 1',TRUE);
=20
dbms_resource_manager.set_initial_consumer_group(p_user_id,'users1');

    end;
    /

exec dave_test('ds');

*
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 3
ORA-06512: at line 1

How do I do this in pl/sql?

I can do it from the command line

SQL> exec
dbms_resource_manager_privs.grant_switch_consumer_group('ds','users1',TR UE);

PL/SQL procedure successfully completed.

SQL> exec
dbms_resource_manager.set_initial_consumer_group('ds','users1');

PL/SQL procedure successfully completed.

Thanks

Dave



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html

The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.=20



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html


Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Wed Apr 21 2004 - 11:13:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US