I am not a DBA but have to resolve this issue.
There are 2 permanent tablespaces in my Oracle 9i database. One for the tables and the other for the Indexes other than the Temporary and UNDO tablespaces
Last week I got the exception
ORA-01654: unable to extend index
<name of the index>
by 128 in tablespace<name of the Index tablespace>
.
I got the tablespace size increased considerably. But still I am getting this error.
I deleted a lot of data thinking that would free-up some space. But that’s of no use.
Will shrinking the tablespace or re-sizing the datafiles of the permanent tablespace resolve this issue?
Also, the statistics hasn’t been gathered since March. Will gathering the latest statistics help me in any way?
Best Answer
Deleting data will not make any difference as Oracle will have kept the space ready to be re-filled. The top space usage in a table is known as the high water mark. Tom Kyte has a great post about it.
You reduce the high water mark by rebuilding the table:
If you're still getting the error after increasing the size of the tablespace there are a couple of possible reasons...
The answer to 1 to is add more space.
To find out your default tablespace:
If this is not your index tablespace you have to specify it when creating the index.
Yes, if you're in 9i it's definitely worth collecting statistics as it doesn't collect them automatically when enough changes have been made to the table - it does in later versions. Use
DBMS_STATS.GATHER_TABLE_STATS()
and only do this after rebuilding the table.Unfortunately in Oracle you can't reduce the size of a tablespace. To use this option you'd have to re-create the tablespace, but smaller, and move everything to it.