Solved

How to delete all objects of a schema or db?

Posted on 2004-09-28
3
9,951 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
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

734 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