reduce the size of the table file [message #431221] |
Mon, 16 November 2009 04:13 |
chuikingman
Messages: 90 Registered: August 2009
|
Member |
|
|
Hi,
I use below command to increase the size of table/file .
SQL> select FILE_NAME from dba_data_files where TABLESPACE_NAME='RCA_CFM_PROP_DATA';
FILE_NAME
--------------------------------------------------------------------------------
/gxsdb/database/oradata4/RCA/RCA_REF_CFM_PROP_DATA.dbf
alter database datafile '/gxsdb/database/oradata4/RCA/RCA_REF_CFM_PROP_DATA.dbf' resize 1M;
After this , I want to reduce back the size of the table again in order to save the space ???
It is already alter for a while .
How can I fall back ???
Any suggestion ??
|
|
|
|
|
|
|
|
Re: reduce the size of the table file [message #434133 is a reply to message #431221] |
Mon, 07 December 2009 06:12 |
DBA_SangramKeshari
Messages: 44 Registered: October 2009 Location: Mumbai
|
Member |
|
|
Before reducing the size the things taken into consideration is
The total size of object on the top of this tablespace.
That information you will get it from dba_segments;
select sum(bytes/1024/1024/1024) "In GB" from dba_segments where TABLESPACE_NAME='t';
if this is 2 gb and you want to reduce the datafile size that is more near to 2 gb.
then you can try with below solutions
(Applicable only if downtime can be tolerable or in weekend)
create another tablespace t2 move all the data to that
tablespace. Resize the old tablespace's data file and move
back the objects again to t tablespace.
|
|
|