Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ALTER DATABASE DATAFILE RESIZE

ice_cold_aswinJul 15 2008 — edited Jan 22 2010
Dear All,

I am actually trying to resize the datafile of the tablespace TBS_DATA to reduce their disk space. When I query the dba_data_files for the size used by the tablespace, this is the result:

select tablespace_name, bytes/(1024*1024) SIZE_IN_MB from dba_data_files;
TABLESPACE_NAME SIZE_IN_MB
-------------------------------- ----------
TBS_DATA 12500

And, when I query the dba_tablespace_usage_metrics, this is the result:

select TABLESPACE_NAME, USED_SPACE/(1024*1024) USED_in_MB, TABLESPACE_SIZE/(1024*1024) tablespace_size, used_percent from dba_tablespace_usage_metrics;

TABLSPC_NAME USED_in_MB TBLSPC_SIZE USED_PERCENT
-------------------------- ------------------ --------------- -------------------------
TBS_DATA .478767395 3.99999809 11.9691906

Actual size of the datafile corresponding to this tablespace is 13GB.

I did'nt understand this scenario. What is the size to which i can shrink my datafile?

Please help me out.

---------------
Thanks in advance,
Aswin.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 19 2010
Added on Jul 15 2008
7 comments
72,083 views