As a matter of fact, I did (among other database "hacking" games), however I can't see how this is relevant here. And BTW, I would not be too comfortable with publicly suggesting to mess up with database dictionary on an open forum like this one - some inexperienced user might even take it seriously and try something simmilar on the production system.....
The isue is not if something is possible at all (if it would not be, how would oracle then do it during "DROP USER" action), the isue is if you can do it with supported actions, like legal DDL statements and PL/SQL APIs. With this in mind I say again: It is not possible to create bullet-proof script to drop all the objects from user schema if you can not connect as the schema owner during the script execution.
Jurij Modic ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Originally posted by jmodic And of course the above script will have to be run N times (where N is some hared-to-define integer > 1) in order to wipe out all objects from a schema. Provided of course that there are some referential integrity constraints among the tables....
Yes this is absolutly correct.
But somebody may try to write "real" script that has to bulid tree(s)
of object's dependences then pass this tree from leafs to roots
and generate right order of "DROP..." commands.
But I guess that executing the "small" version of script 2-3-4... times a little bit easy.