Wednesday, September 27, 2017

FIXED! ORA-01654: Unable to Extend Index in Tablespace

The problem in Oracle is that when you delete a record, Oracle will leave it blank. That’s a real waste of space when you delete thousands of records. So deleting records will not help to solve this problem.

Here's an example:

Adding 6 records:
[1][2][3][4][5][6]

After deleting records 2 and 3:
[1][][][4][5][6]

After adding value 7 and 8:
[1][][][4][5][6][7][8]

Fortunately, there is a solution to fix this. You can shrink your tables. By shrinking your tables, Oracle will remove all blank records. To shrink a table, use the following SQL statement.

alter table <mytable> enable row movement;
alter table <mytable> shrink space;
alter table <mytable> disable row movement;

analyze table <mytable> compute statistics;
commit;

If that doesn’t work for you, then you have not enough disk space left. Adding some disk space will solve your problem too.

Source: http://laurenthinoul.com/how-to-fix-ora-01654-unable-to-extend-index-in-tablespace/

No comments:

Post a Comment