Solved

How to delete all objects of a schema or db?

Posted on 2004-09-28
3
9,932 Views
Last Modified: 2009-07-29
With what sql statement(s) can I delete all objects of a db in oracle 9i? (Without deleting and recreating the database)

Regards,
pb
0
Comment
Question by:psychicblue
3 Comments
 
LVL 11

Assisted Solution

by:cjjclifford
cjjclifford earned 25 total points
ID: 12170436
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
 
LVL 12

Accepted Solution

by:
geotiger earned 25 total points
ID: 12170448
You just need to drop all the users that you created such as

drop user xxx cascade;

0
 
LVL 4

Expert Comment

by:boriskalavsky
ID: 12170839
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now