A few changes to Pando's script make it generic and without the DBA dependency:
But it does not detract from the fact that the original post requested how to remove all tables and not all objects. Unless the poster is clear in thier requirements than confusion like this is bound to occur.Code:set termout on set head off feedback off verify off termout off spool /tmp/drop_all.sql Select Rtrim('drop '||object_type||' ' ||object_name||decode(object_type,'TABLE',' cascade constraints') || ';' ) from user_objects order by object_name / spool off set head on feedback on verify on spool /tmp/drop_all.log set echo on @/tmp/drop_all.sql spool off set echo off set pagesize 14 termout on
Regards




Reply With Quote