| Back to logs list
328207 2010 年 09 月 06 日 19:12 Reading (loading. ..) Comments (2) Category: Personal Diary
Today, when testing a data import, the tragic discovery of the hard disk and data files to be filled, the largest table space 9G, there are several other G. I have a table associated with the user are deleted, but table space is not their release. A SQL statement to find the following,
lebron iii, its role is to query (splicing) the narrow table space file (datafile) statement,
nike lebron, the default is to calculate all the table space file,
zoom lebron shoes, given the size can be released. According to the results it gives, the implementation of such
select a.file #, a.name,
nba shoes, a.bytes/1024/1024 CurrentMB, ceil (HWM * a.block_size) / 1024/1024 ResizeTo, (a.bytes - HWM * a.block_size) / 1024/1024 ReleaseMB, 'alter database datafile' ''| | a.name ||''' resize '| | ceil (HWM * a.block_size/1024/1024) | |' M; 'ResizeCMD from v $ datafile a,
lebron james vii, (select file_id,
kobe v shoes, max (block_id + blocks-1) HWM from dba_extents ; group by file_id) b where a.file # = b.file_id (+) and (a.bytes - HWM * block_size)> 0 order by 5