Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Drop all the objects inside a tablespace.

Re: Drop all the objects inside a tablespace.

From: Vincent Ventrone <vav_at_brandeis.edu>
Date: Wed, 22 Aug 2001 11:05:15 -0400
Message-ID: <9m0hh3$pj1$1@new-news.cc.brandeis.edu>


> I want to drop all the tables inside a tablespace without dropping the
> tablespace.So that after dropping the old tables,I can create new
> tables inside that tablespace. Is there a way?

Sure -- just generate a script w/ a SQL statement like this:

select 'drop table '||owner||'.'||table_name||';' from dba_tables where tablespace_name='<FOO>';

then just run the script. This script will also drop any indexes associated with the tables. If you have constraints on the tables you may need to disable them first. Or else try running the generated drop script multiple times until everything is gone, though that may not work in which case disable constraints first -- send me email if you need a script to do that or else search Meta-Link. Received on Wed Aug 22 2001 - 10:05:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US