How to delete all objects of a schema or db?

With what sql statement(s) can I delete all objects of a db in oracle 9i? (Without deleting and recreating the database)

Regards,
pb
psychicblueAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
geotigerConnect With a Mentor Commented:
You just need to drop all the users that you created such as

drop user xxx cascade;

0
 
cjjcliffordConnect With a Mentor Commented:
you could recreate all the users/schemas.

or write a PL/SQL procedure to loop through USER_OBJECTS dropping everything (take care if you have Stored Java deployed...) Also, take care to DBMS_JOB.REMOVE() all the jobs for the user...
0
 
boriskalavskyCommented:
It is a lot easier to recreate the database. For that you can use DBCA (database create assistant). You can create a template from existing database and use it to rebuild.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.