HOW TO AVOID TRUNCATE AND DROP IN ORACLE SQL DEVELOPER [message #303945] |
Mon, 03 March 2008 06:39 |
MIFI
Messages: 256 Registered: February 2008 Location: U.K.
|
Senior Member |
|
|
As we can use table product_user_profile for sqlplus tool to avoid Drop and Truncate through sqlplus. Is there any way that we can stop drop and truncate from the tool called 'ORACLE SQL DEVELOPER'
Regards,
Mifi
|
|
|
|
|
|
Re: HOW TO AVOID TRUNCATE AND DROP IN ORACLE SQL DEVELOPER [message #303975 is a reply to message #303967] |
Mon, 03 March 2008 09:37 |
MIFI
Messages: 256 Registered: February 2008 Location: U.K.
|
Senior Member |
|
|
I have got the solution
Writing following trigger for drop on whole schema will do the trick like following
CREATE OR REPLACE TRIGGER drop_trigger
BEFORE DROP ON <schema name>.SCHEMA
BEGIN
RAISE_APPLICATION_ERROR (
num => -20000,
msg => 'Cannot drop object');
END;
|
|
|
|
|
|