Friday, April 1, 2011

Freeing space in SYSAUX

If your SYSAUX tablespace grows a lot, chances are that there is a lot of statistics data in that tablespace. You might try to free space with this sentences:

SQL> exec DBMS_STATS.PURGE_STATS(SYSDATE-30);

PL/SQL procedure successfully completed.

SQL> alter table WRI$_OPTSTAT_HISTGRM_HISTORY move tablespace sysaux;

Table altered.

SQL> alter index I_WRI$_OPTSTAT_H_OBJ#_ICOL#_ST rebuild online;

Index altered.

SQL> alter index I_WRI$_OPTSTAT_H_ST rebuild online;

Index altered.

SQL> alter table WRI$_OPTSTAT_HISTHEAD_HISTORY move tablespace sysaux;

Table altered.

SQL> alter index I_WRI$_OPTSTAT_HH_OBJ_ICOL_ST rebuild online;

Index altered.

SQL> alter index I_WRI$_OPTSTAT_HH_ST rebuild online;

Index altered.

SQL> ALTER TABLE WRH$_ACTIVE_SESSION_HISTORY SHRINK SPACE CASCADE;

Table altered.


More information:

Purging statistics from the SYSAUX tablespace

No comments:

Post a Comment