RE: RE : Query for shrinking datafile
Date: Mon, 3 May 2010 10:15:22 +0200
Message-ID: <CF9A39CD0F65EA49ADF70FCBF9BC2FF7DE4DB5_at_SW-GNETCW-MBX02.tcads.thomascook.com>
But you will likely have to update that script since it still assumes that your whole database is using the same blocksize. The blocksize is now included in v$datafile for example :
select a.file_id fileno, c.name filename, max(a.block_id + a.blocks - 1) * c.block_size hwmfrom dba_extents a, v$datafile c
where a.file_id = c.file#
and c.name = '/directoryname/filename.dbf' group by a.file_id, c.name, c.block_size;
mvg / regards,
Jo Holvoet
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Bertrand Guillaumin
Sent: maandag 3 mei 2010 10:04
To: harel.safra_at_gmail.com; s.cislaghi_at_gmail.com
Cc: Oracle L
Subject: RE : Query for shrinking datafile
You can find the asktom queries in the following link : http://www.oracle.com/technology/oramag/oracle/04-sep/o54asktom.html
Go to the last paragraph.
You also have a query to know what at the end of the datafile.
But if you really need to shrink a datafile, you often have to do a reorg .
HTH
On 03/05/2010 10:49, Stefano Cislaghi wrote:
> Hi all,
>
> do you use any query or method to discover how much space you can save
> on a datafile? I want to say...suppose to shrink your datafile, which
> is the minimum size, according to the highest HWM position, you can
> reach for your datafile?
>
> Which is the easiest way to achieve this?
>
>
> Thanks
> Ste
>
-- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-lReceived on Mon May 03 2010 - 03:15:22 CDT