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!

How to shrink a tablespace;;;Plz Help Me

orawissMay 5 2008 — edited May 12 2008
Hello,
I have droped 2 big tables (more than 20 millions of records each one) and eventually many indexes in reference.
In my Database server I don't have enougth space, I have only 5Go.
I have to free disk space now by shrinking the size of Index and Data Tablespace.

I used theses scripts to analyse my object plecement repartiton on both tablespaces : INDEX and DATA.

1- select file_id, block_id, blocks,
owner||'.'||segment_name "Name"
from sys.dba_extents
where tablespace_name = 'INDX'
UNION
select file_id, block_id, blocks,
'Free'
from sys.dba_free_space
where tablespace_name = 'INDX'
order by 1,2,3


2- select file_id, block_id, blocks,
owner||'.'||segment_name "Name"
from sys.dba_extents
where tablespace_name = 'DATA'
UNION
select file_id, block_id, blocks,
'Free'
from sys.dba_free_space
where tablespace_name = 'DATA'
order by 1,2,3


After executing these scripts, I find many free extends in the middle and the command :

ALTER DATABASE DATAFILE ... RESIZE is failed

Any idea How to resize / reduce my tablespaces ?
My database version 's :
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 On Linux Sever.

Thanks a lot

Message was edited by:
OracleJavaLinux
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 9 2008
Added on May 5 2008
20 comments
5,649 views