| create trigger to create view but give me error [message #576024] |
Wed, 30 January 2013 14:50  |
mosman
Messages: 9 Registered: April 2005
|
Junior Member |
|
|
i try to make trigger to execute immedate create or replace view
(
CREATE OR REPLACE TRIGGER xxxx
BEFORE INSERT ON table1
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
declare
l number ;
v_ddl varchar2(4000);
v_job number;
begin
v_ddl := 'create or replace view allp as select * from allx';
execute immediate v_ddl ;
end if;
end;
)
it give me error for insuffition privilage in execute immediate
and after i make
GRANT CREATE ANY TRIGGER TO user
give me error can't commit in trigger
any one can help me
|
|
|
|
|
|
| Re: create trigger to create view but give me error [message #576026 is a reply to message #576024] |
Wed, 30 January 2013 14:56   |
 |
Michel Cadot
Messages: 54190 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Also, Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" or "Preview Quick Reply" button to verify.
Also always post your Oracle version, with 4 decimals.
In the end, when you post such question, use SQL*Plus and copy and paste your session, the WHOLE session with the creation DDL of ALL objects involved.
Regards
Michel
[Updated on: Wed, 30 January 2013 14:56] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|