Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Have you ever run grants from plsql?
I'm trying to do just this with dinamic SQL.
Someone gave my user the DBA role & now I have to create users & run its grants using PL/SQL.
I'm trying with SQL Navigator & when I debug my procedure SQL Navigator's debugger tells me the following
Error -1932: ORA-01932: ADMIN option not granted for role 'CONNECT' ORA-01932: ADMIN option not granted for role 'CONNECT' ORA-06512: at line 9
It happens just after parse.
The code I've used is:
--Grant connect
v_run := 'grant connect to ' || UPPER (pi);--v_run varchar2 (200) v_run_id := DBMS_SQL.open_cursor;--v_run_id binary_integer DBMS_SQL.parse (v_run_id, v_run, DBMS_SQL.v7); w_run := DBMS_SQL.execute (v_run_id);--w_run binary_integer DBMS_SQL.close_cursor (v_run_id);
I've been looking for some documentation & I've found this procedure
PROCEDURE DBMS_AQADM.GRANT_TYPE_ACCESS (user_name IN VARCHAR2);
I don't understand what is this procedure useful for. Could it be useful for me?
Thank you in advance,
Patxi.Received on Mon May 14 2001 - 08:21:00 CDT
![]() |
![]() |