ALTER DATABASE DATAFILE RESIZE
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.