Re: To free a db file, no other solution than exp/imp ??

From: <jdorlon_at_my-deja.com>
Date: Wed, 24 Jan 2001 19:59:53 GMT
Message-ID: <94nc7h$n97$1_at_nnrp1.deja.com>


If the tablespace contains indexes, just alter...rebuild them to another tablespace, then size your datafile how you want it, then alter..rebuild the indexes back to the original tablespace. 'alter index X rebuild tablespace Y;'

If the tablespace contains tables and you have 8i, then you can user 'alter table X move tablespace Y;' (after doing so you will need to rebuild the associated indexes)

-John

In article <94mbaa$p28$1_at_nnrp1.deja.com>,   monsri_at_my-deja.com wrote:
> Hi,
> I've purged a datafile that's almost 2G big, on which I
> still have 17 segments. Due to fragmentation, I still
> can't resize this file to anything, although all 17
> remaining segments amount to about 50M in size in this
> file !
>
> My question is: is there NO OTHER WAY of re-gathering
> together this file's extents than through an export/import,
> in order to resize it afterwards ??
>
> NO OTHER WAY AT ALL ??
>
> Thks !
> BO'M
>
> (here is the SQL I use to visualize my file's fragmentation:
> > select segment_name, block_id, blocks, file_id
> > from dba_extents
> > where file_id=&&1
> > union
> > select 'free' segment_name, block_id, blocks, file_id
> > from dba_free_space
> > where file_id=&&1
> > order by file_id,block_id
> > /)
>
> Sent via Deja.com
> http://www.deja.com/
>

Sent via Deja.com
http://www.deja.com/ Received on Wed Jan 24 2001 - 20:59:53 CET

Original text of this message