Re: ORA-03297 after PURGE and wanting to resize datafiles

From: Sreejith S Nair <sreejithsna_at_gmail.com>
Date: Mon, 23 Jan 2012 06:54:35 +0530
Message-Id: <7F3508D9-8069-4F99-ABC2-A256F588A706_at_gmail.com>



Anthony,
I recommend you to go through this post from Jonathan Lewis.

http://jonathanlewis.wordpress.com/2010/02/06/shrink-tablespace/

Sreejith,

Sent from my iPhone

On 21-Jan-2012, at 6:33 AM, Anthony Ballo <anthony.ballo_at_onecall.com> wrote:

> Anyone running SOA 11g out there? Well, we just started working on a data
> purge strategy (PS4) using the Looped Purge script supplied by Oracle.
> Like others have written on the web, it doesn't delete everything so I put
> together a "manual purge" script that deletes the data and then does a
> SHRINK and DEALLOCATE UNUSED on various tables.
>
> My question is this: We have purged about 90% of the data in our
> tablespace and would now like to recover (shrink) the datafile(s) using:
>
> ALTER DATABASE DATAFILE '+DG1/tstsoa/datafile/dev_soainfra.310.767790105'
> RESIZE 5G;
> commit;
>
> But then receive this:
>
> ERROR:
> ORA-03297: file contains used data beyond requested RESIZE value
>
>
> Is there now a way to "coalesce" the data stored in the datafile so it is
> not fragmented? Or, is my only option to create a new tablespace and move
> all the Objects (tables and indexes) to the new - then rebuild (drop
> datafiles) and resize the Original tablespace and move the Objects back?
>
>
> Thanks,
>
> Anthony
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Sun Jan 22 2012 - 19:24:35 CST

Original text of this message