Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: quick pl/sql question
Thanks again, still not working though
create or replace procedure dave_test (p_user_id IN varchar2)=20
AUTHID CURRENT_USER AS
begin
dbms_resource_manager_privs.grant_switch_consumer_group(p_user_id,'users
1',TRUE);
dbms_resource_manager.set_initial_consumer_group(p_user_id,'users1');
end;
/
Procedure created.
SQL> =20
Grant succeeded.
SQL> grant execute on dbms_resource_manager to hangdam;
Grant succeeded.
SQL> grant execute_catalog_role to hangdam;
Grant succeeded.
SQL> grant select_catalog_role to hangdam;
Grant succeeded.
SQL> connect 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 3 ORA-06512: at line 1
If I run as the user who owns it...
SQL>=20
SQL> connect cerebrus/cerebrus
Connected.
SQL> exec cerebrus.dave_test('ds');
PL/SQL procedure successfully completed.
Thanks
Dave
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Freeman, Donald
Sent: 22 April 2004 14:42
To: oracle-l_at_freelists.org
Subject: RE: quick pl/sql question
You may have to issue one or both of the following grants to whoever you
=3D
want to run your procedure.
>From the administrators guide:
Users with explicit object privileges or those who connect with =3D
administrative privileges (SYSDBA) can access objects in the SYS schema.
=3D
Another means of allowing access to objects in the SYS schema is by =3D
granting users any of the following roles:
SELECT_CATALOG_ROLE=3D20
This role can be granted to users to allow SELECT privileges on all data
=3D
dictionary views.
EXECUTE_CATALOG_ROLE=3D20 This role can be granted to users to allow EXECUTE privileges for =3D packages and procedures in the data dictionary.
> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org
> [mailto:oracle-l-bounce_at_freelists.org]On Behalf Of David Sharples
> Sent: Thursday, April 22, 2004 9:18 AM
> To: oracle-l_at_freelists.org
> Subject: RE: quick pl/sql question
>=3D20
>=3D20
> Hi, Yes it does work if run as the owner of the package, doesn't work
> when someone with execute on that package tries it
>=3D20
>=3D20
-- 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 Thu Apr 22 2004 - 08:53:06 CDT