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: dropping tables in a tablespace

Re: dropping tables in a tablespace

From: Thiru <tmgn_at_excite.com>
Date: Tue, 21 Sep 1999 16:00:24 -0400
Message-ID: <37E7E3D8.116CC31C@excite.com>


You have limited options :
1.If the Tablespace is not very Big(like many many GBs or TBs), I would prefer to Recreate it
2. Disable all the Foreign Key Constraints on all the Tables and Truncate all the Tables and then Import with ignore=y option.. 3. Create a Script to drop all the Tables (CASCADE Constraints) like
set heading off
spool drop_all.sql
select 'drop table '||table_name||' cascade constraints;'||chr(10) from user_tables;
spool off
@drop_all

Hope this helps

-Thiru

Sudarshan Sampath wrote:

> Hi folks,
> I am trying to do a fresh import of data into a tablespace. Right now I
> want to
> get rid of all the tables (250 of them) in this tablespace as it I want
> to import
> the tables afresh.
>
> How do I drop all tables in a tablespace? I know how to drop a
> tablespace...
> but that means I would have to create new tablespaces with the right
> parameters
> from the beginning. I want to be able to clear out all the data (tables,
> indexes
> views....etc.) in a tablespace all at once. Is there a command to do
> that?
>
> Thanks,
>
> -Sudarshan
Received on Tue Sep 21 1999 - 15:00:24 CDT

Original text of this message

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