Home » SQL & PL/SQL » SQL & PL/SQL » Before Drop trigger
Before Drop trigger [message #305865] Wed, 12 March 2008 04:36 Go to next message
subbu_tce
Messages: 98
Registered: July 2007
Location: pune
Member
Dear All,
When i tried to dop emp table system is saying that insufficient privilege.Below is my code .
Am trying to

drop table emp;
/
Kindly advice.

CREATE OR REPLACE TRIGGER no_drop_trg
BEFORE DROP ON customer.schema
DECLARE
v_msg VARCHAR2(1000) ;
BEGIN
v_msg := 'No drop allowed on ' || DICTIONARY_OBJ_OWNER || ' SCHEMA';
IF DICTIONARY_OBJ_OWNER = 'CUSTOMER' AND DICTIONARY_OBJ_NAME ='EMP' AND DICTIONARY_OBJ_TYPE = 'TABLE' THEN
execute immediate 'create table emp_3 as select * from emp';
End if;
END;
Re: Before Drop trigger [message #305866 is a reply to message #305865] Wed, 12 March 2008 04:40 Go to previous message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This is not because you don't know the answer that this is an expert question.
When you don't the answer to an error message post in NEWBIE forum.
Read http://www.orafaq.com/forum/mv/msg/97466/305843/102589/#msg_305843

Roles are not enabled in the trigger.

Regards
Michel

[Updated on: Wed, 12 March 2008 04:43]

Report message to a moderator

Previous Topic: count the number of 'I'
Next Topic: Can't figure out the simplest, two-line proc!
Goto Forum:
  


Current Time: Fri Dec 09 02:02:17 CST 2016

Total time taken to generate the page: 0.09168 seconds