Solved

How to delete all objects of a schema or db?

Posted on 2004-09-28
3
9,931 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
Comment Utility
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
Comment Utility
You just need to drop all the users that you created such as

drop user xxx cascade;

0
 
LVL 4

Expert Comment

by:boriskalavsky
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

763 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

11 Experts available now in Live!

Get 1:1 Help Now