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: Pete's <empete2000_at_yahoo.com>
Date: 22 Aug 2001 13:48:24 -0700
Message-ID: <6724a51f.0108221248.c5589eb@posting.google.com>


It is possible to do, but, if there are other tables w/ foreign keys pointing to the tables you want to drop, you will need to drop the foreign keys. You can write sql to create the sql to do it for you. Like the following:

select 'drop table ',owner||'.'||table_name, ';'   from dba_segments
 where tablespace_name = 'YOUR_TABLESPACE_NAME'    and segment_type = 'TABLE'
;

Check the syntax and the segment_type value, but, run that in sqlplus or worksheet, then run the output.

HTH,
Pete's

guptap_at_synygy.com (Prabuddha) wrote in message news:<567752f5.0108220628.260d53f4_at_posting.google.com>...
> Hi All,
> 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?
>
> Thanks in advance.
> Prabuddha
Received on Wed Aug 22 2001 - 15:48:24 CDT

Original text of this message

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