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!

Need to reduce tablespace physical size -unsure how to proceed

666278Jun 25 2009 — edited Jun 29 2009
Hello everyone,

my problem is that I am running out of disc space and I noticed that my dbf files are crazy big, so naturally, I am looking to reduce them.
However, I am not a DBA and I am unsure how to proceed, maybe someone here can give me a pointer to more info or maybe even has the right command for me.

My dbf files are in C:\app\Fargo\oradata\orcl
I am running Oracle 11g locally on my computer (research project).

I have the following files
CONTROL01.CTL --- 11,536 KB
CONTROL02.CTL --- 11,536 KB
CONTROL03.CTL --- 11,536 KB
EXAMPLE01.DBF --- 102,408 KB
LIDAR_DATA2.DBF --- 11,517,960 KB
LIDAR_PROJECT.DBF --- 33,554,424 KB
LIDAR_TEMP.DBF ---3,408,904 KB
REDO01.TXT --- 51,201 KB
REDO02.TXT --- 51,201 KB
REDO03.TXT --- 51,201 KB
SYSAUX01.DBF --- 22,472,392 KB
SYSTEM01.DBF --- 716,808 KB
TEMP01.DBF --- 550,920 KB
TEMP_2.DBF --- 819,208 KB
UNDOTBS01.DBF --- 33,554,424 KB
USERS01.DBF --- 5,128 KB

My main tablespace that I use is called LIDAR_PROJECT and has the files lidar_project.dbf and lidar_data2.dbf.

I found the following command online:

SQL> select file_name, hwm, blocks total_blocks, blocks-hwm+1 shrinkage_possible
2 from dba_data_files a,
3 (select file_id, max(block_id+blocks) hwm
4 from dba_extents group by file_id ) b
5 where a.file_id = b.file_id;

FILE_NAME
--------------------------------------------------------------------------------

HWM TOTAL_BLOCKS SHRINKAGE_POSSIBLE
---------- ------------ ------------------
C:\APP\FARGO\ORADATA\ORCL\SYSTEM01.DBF
89113 89600 488

C:\APP\FARGO\ORADATA\ORCL\LIDAR_PROJECT.DBF
4194185 4194302 118

C:\APP\FARGO\ORADATA\ORCL\SYSAUX01.DBF
2705801 2809048 103248


FILE_NAME
--------------------------------------------------------------------------------

HWM TOTAL_BLOCKS SHRINKAGE_POSSIBLE
---------- ------------ ------------------
C:\APP\FARGO\ORADATA\ORCL\EXAMPLE01.DBF
10249 12800 2552

C:\APP\FARGO\ORADATA\ORCL\USERS01.DBF
393 640 248

C:\APP\FARGO\ORADATA\ORCL\LIDAR_DATA2.DBF
1438729 1439744 1016


FILE_NAME
--------------------------------------------------------------------------------

HWM TOTAL_BLOCKS SHRINKAGE_POSSIBLE
---------- ------------ ------------------
C:\APP\FARGO\ORADATA\ORCL\UNDOTBS01.DBF
3484121 4194302 710182


7 rows selected.

I am unsure how to proceed from this in order to reduce the file size.
My block size is

SQL> show parameter db_block_size

NAME TYPE VALUE
------------------------------------ ----------- -------
db_block_size integer 8192

I would really appreciate help!!!!!

Cheers,
F.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 27 2009
Added on Jun 25 2009
9 comments
3,037 views