To prevent the truncation of tables in your own schema, write a trigger in your schema.
Now when you try to truncate a table in your own schema, you will receive the following errors:
Another way to prevent user from dropping objects from own schema is as below:
- Here we are not using any trigger
- This would prevent drop object for SQL*PLUS only
- We could configure it for other IDE tools like TOAD, SQLDEVELOPER etc
If for example user SCOTT attempts to Drop an object, it will get this error: