Use of GRANT,CREATE within a PL/SQL Block
Date: 1995/11/08
Message-ID: <MONISHA.95Nov8151246_at_pt8404.livonia>#1/1
I'm sorry if this is a FAQ.
I'm using Oracle7 Server Release 7.1.6.2.0 and PL/SQL Release 2.1.6.2.0
Does anyone know why I cannot use a GRANT statement within a PL/SQL block??
example
create trigger grnt_ppn_app_roles_trig
before insert on tapme.ppn_app_roles for each row
begin
if inserting
and (:new.username is not null)
and (:new.role is not null)
then
grant connect,resource,:new.role to :new.username identified by :new.username;
end if;
end;
I get the following error message:
*
ERROR at line 1:
ORA-06550: line 8, column 3:
PLS-00103: Encountered the symbol "GRANT" which is an unsupported reserved
word.
Resuming parse at line 8, column 80.
ORA-06550: line 9, column 6:
PLS-00103: Encountered the symbol "IF" when expecting one of the following:
a PL/SQL variable or double-quoted string
a simple name
an optional simple name
Resuming parse at line 9, column 8.
Any info would be appreciated.
Thanx in advance,
Monisha Tope.
monisha_at_tc1225.pto.ford.com
Received on Wed Nov 08 1995 - 00:00:00 CET