轉 SYSAUX tablespace 100% full
結合metalink文件454678.1 和在網上看到別人 How to deal with SYSAUX tablespace 100% full ?
The statistics used by Oracle Optimizer inside the Oracle Database Unit (DBU) are updated daily and stored for 31 days by default. For large tables, the statistics can use a significant amount of space in the SYSAUX tablespace
So you have to purge the data manually.but the purge procedure will fail in most of the situation .because during the period , it will use up the UNDOTBS* space.even this, i suggest you should try it firstly. if it fail, then you can run the step 7 direclty.
The following is an example that the earlist data is Sep.4 ,and i want to purge it to the current Oct.11
1. check the oldest datat in it .
su - oracle
sqlplus "/ as sysdba"
SQL> select dbms_stats.get_stats_history_availability from dual;
GET_STATS_HISTORY_AVAILABILITY
---------------------------------------------------------------------------
04-SEP-08 10.47.40.679300000 PM +05:30
2. purge the old stats data
SQL> exec dbms_stats.purge_stats(to_timestamp('20080915','YYYYMMDD'));
exec dbms_stats.purge_stats(to_timestamp('20080920','YYYYMMDD'));
exec dbms_stats.purge_stats(to_timestamp('20080925','YYYYMMDD'))
exec dbms_stats.purge_stats(to_timestamp('20081001','YYYYMMDD'))
exec dbms_stats.purge_stats(to_timestamp('20081005','YYYYMMDD'))
exec dbms_stats.purge_stats(to_timestamp('20081010','YYYYMMDD'))
3. check the old stats data has been deleted and now the latest are :
SQL> select dbms_stats.get_stats_history_availability from dual;
GET_STATS_HISTORY_AVAILABILITY
---------------------------------------------------------------------------
11-OCT-08 05.18.08.605495000 PM +05:30
4. Only after the step 1,2,3, now the old data has been pruged. even after this, the SYSAUX table space is still full.
This is a known problem about oracle (Statistics space used by SM/OPTSTAT in the SYSAUX tablespace is not reclaimed after purging).
5. So you can run the awrinfo to check which table or index has occupied the space. then rebuild them. here for example
su - oracle
cd /u01/app/oracle/
sqlplus "/ as sysdba"
sql> @?/rdbms/admin/awrinfo
sql> ! more ./awrinfo.txt
**********************************
(4) Space usage by non-AWR components (> 500K)
**********************************
COMPONENT MB SEGMENT_NAME SEGMENT_TYPE
--------- --------- --------------------------------------------------------------------- ---------------
NON_AWR 528.0 SYS.I_WRI$_OPTSTAT_H_OBJ#_ICOL#_ST INDEX
NON_AWR 470.0 SYS.WRI$_OPTSTAT_HISTGRM_HISTORY TABLE
NON_AWR 240.0 SYS.I_WRI$_OPTSTAT_H_ST INDEX
NON_AWR 72.0 SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY TABLE
NON_AWR 40.0 SYS.I_WRI$_OPTSTAT_HH_OBJ_ICOL_ST INDEX
6. so we have to move the table and rebuild the index to free the SYSAUX tablespace.
ALTER TABLE SYS.WRI$_OPTSTAT_HISTGRM_HISTORY MOVE;
ALTER TABLE SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY MOVE;
alter index I_WRI$_OPTSTAT_H_OBJ#_ICOL#_ST rebuild nologging;
alter index I_WRI$_OPTSTAT_H_ST rebuild nologging;
alter index I_WRI$_OPTSTAT_HH_OBJ_ICOL_ST rebuild nologging;
7.So one thing I have to say here is that because the old stats data are only be used to analyze the Oracle/SQL performance to give some refernce to the Oracle Adminstrator , except this, nothing is useful for this. So you can delete the infomation from the stats table direcltly)
Sql> truncate table SYS.WRI$_OPTSTAT_HISTGRM_HISTORY;
Sql> truncate table SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY ;
the INDEX is truncated automatically when truncating the table. [@more@]
The statistics used by Oracle Optimizer inside the Oracle Database Unit (DBU) are updated daily and stored for 31 days by default. For large tables, the statistics can use a significant amount of space in the SYSAUX tablespace
So you have to purge the data manually.but the purge procedure will fail in most of the situation .because during the period , it will use up the UNDOTBS* space.even this, i suggest you should try it firstly. if it fail, then you can run the step 7 direclty.
The following is an example that the earlist data is Sep.4 ,and i want to purge it to the current Oct.11
1. check the oldest datat in it .
su - oracle
sqlplus "/ as sysdba"
SQL> select dbms_stats.get_stats_history_availability from dual;
GET_STATS_HISTORY_AVAILABILITY
---------------------------------------------------------------------------
04-SEP-08 10.47.40.679300000 PM +05:30
2. purge the old stats data
SQL> exec dbms_stats.purge_stats(to_timestamp('20080915','YYYYMMDD'));
exec dbms_stats.purge_stats(to_timestamp('20080920','YYYYMMDD'));
exec dbms_stats.purge_stats(to_timestamp('20080925','YYYYMMDD'))
exec dbms_stats.purge_stats(to_timestamp('20081001','YYYYMMDD'))
exec dbms_stats.purge_stats(to_timestamp('20081005','YYYYMMDD'))
exec dbms_stats.purge_stats(to_timestamp('20081010','YYYYMMDD'))
3. check the old stats data has been deleted and now the latest are :
SQL> select dbms_stats.get_stats_history_availability from dual;
GET_STATS_HISTORY_AVAILABILITY
---------------------------------------------------------------------------
11-OCT-08 05.18.08.605495000 PM +05:30
4. Only after the step 1,2,3, now the old data has been pruged. even after this, the SYSAUX table space is still full.
This is a known problem about oracle (Statistics space used by SM/OPTSTAT in the SYSAUX tablespace is not reclaimed after purging).
5. So you can run the awrinfo to check which table or index has occupied the space. then rebuild them. here for example
su - oracle
cd /u01/app/oracle/
sqlplus "/ as sysdba"
sql> @?/rdbms/admin/awrinfo
sql> ! more ./awrinfo.txt
**********************************
(4) Space usage by non-AWR components (> 500K)
**********************************
COMPONENT MB SEGMENT_NAME SEGMENT_TYPE
--------- --------- --------------------------------------------------------------------- ---------------
NON_AWR 528.0 SYS.I_WRI$_OPTSTAT_H_OBJ#_ICOL#_ST INDEX
NON_AWR 470.0 SYS.WRI$_OPTSTAT_HISTGRM_HISTORY TABLE
NON_AWR 240.0 SYS.I_WRI$_OPTSTAT_H_ST INDEX
NON_AWR 72.0 SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY TABLE
NON_AWR 40.0 SYS.I_WRI$_OPTSTAT_HH_OBJ_ICOL_ST INDEX
6. so we have to move the table and rebuild the index to free the SYSAUX tablespace.
ALTER TABLE SYS.WRI$_OPTSTAT_HISTGRM_HISTORY MOVE;
ALTER TABLE SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY MOVE;
alter index I_WRI$_OPTSTAT_H_OBJ#_ICOL#_ST rebuild nologging;
alter index I_WRI$_OPTSTAT_H_ST rebuild nologging;
alter index I_WRI$_OPTSTAT_HH_OBJ_ICOL_ST rebuild nologging;
7.So one thing I have to say here is that because the old stats data are only be used to analyze the Oracle/SQL performance to give some refernce to the Oracle Adminstrator , except this, nothing is useful for this. So you can delete the infomation from the stats table direcltly)
Sql> truncate table SYS.WRI$_OPTSTAT_HISTGRM_HISTORY;
Sql> truncate table SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY ;
the INDEX is truncated automatically when truncating the table. [@more@]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/48010/viewspace-1028649/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- The SYSAUX Tablespace (40)UX
- Creating the SYSAUX Tablespace (72)UX
- How to move Oracle Spatial objects from SYSAUX tablespace to a user defined tablespace [ID 1119758.1OracleObjectUX
- 【AWR】Suggestions if Your SYSAUX Tablespace Grows Rapidly or Too LargeUXAPI
- imp full database (轉官檔)Database
- CREATE TABLESPACE命令詳解(轉)
- DX: Full Screen GUI Development 2 (轉)GUIdev
- Oracle SYSAUX 表空間使用率100% 導致的DB 故障OracleUX
- sysaux bigUX
- SYSAUX 說明UX
- 計算sysaux中各主件對sysaux空間的使用!UX
- Index Full Scan vs Index Fast Full ScanIndexAST
- Index Full Scans和Index Fast Full ScansIndexAST
- Index Full Scan 與 Index Fast Full ScanIndexAST
- tablespace 大檔案,undo,temp tablespace
- [20181009]12C FULL DATABASE CACHING.txtDatabase
- 32、SYSAUX表空間UX
- Performing Tablespace Point-in-Time Recovery with Recovery Manager(轉)ORM
- 【轉載-ORACLE】ORA-6512 During Full ExportOracleExport
- INDEX FULL SCAN和INDEX FAST FULL SCAN區別IndexAST
- index full scan 和 index FAST full scan 區別IndexAST
- Index Full Scan 與 Index Fast Full Scan (Final)IndexAST
- rowid,index,INDEX FULL SCAN,INDEX FAST FULL SCAN|IndexAST
- Oracle清理SYSAUX表空間OracleUX
- ORACLE的SYSAUX 表空間OracleUX
- 【SQLServer】Filegroup is fullSQLServer
- db2 sms tablespace 不支援large tablespaceDB2
- 【Oracle】oracle tablespace&datafile -- oracle表空間 分享[轉]Oracle
- 從system/sysaux空間轉移TABLE&Index到其它表空間UXIndex
- INDEX UNIQUE SCAN,INDEX FULL SCAN和INDEX FAST FULL SCANIndexAST
- INDEX FULL SCAN和INDEX FAST FULL SCAN的區別IndexAST
- Tablespace Space Script
- remap_tablespaceREM
- Index的掃描方式:index full scan/index fast full scanIndexAST
- index full scan 和 index fast full scan (IFS,FFS)的不同IndexAST
- 2.5.4.1 關於SYSAUX表空間UX
- Clean WRH$_ACTIVE_SESSION_HISTORY in SYSAUXSessionUX
- 認識 SYSAUX 表空間(zt)UX