Delete All Oracle User Objects

If you don't have system level access, and want to clean your oracle schema, the following sql will produce a series of drop statments, which can then be executed. Not all of them will execute - if you drop with cascade, dropping the PK_* indices will fail.

select 'drop '||object_type||' '|| object_name||  DECODE(OBJECT_TYPE,'TABLE',' CASCADE CONSTRAINTS;',';')from user_objects;

Confirm with:

select * from user_objects

Purge out the recyclebin if not needed:

purge recyclebin;

Post new comment

  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.
Comment