ORACLE10G如何清除OEM下的历史警告信息
问题描述:OEM的HOME页面可以显示ORACLE的报警信息,但报警事件清除后该信息不会自动清除。随着时间的增长,信息量逐渐加大,解决方法是手工予以清除。
严重性 |
||||||
Sample |
Cluster Database |
Tablespaces Full |
Tablespace Free Space (MB) |
2008-12-8 10:24:36 |
||
Sample1 |
Database Instance |
Waits by Wait Class |
Database Time Spent Waiting (%) |
2008-12-10 0:45:07 |
||
Sample1 |
Database Instance |
Global Cache Statistics |
Global Cache Average Current Block Request Time (centi-seconds) |
2008-12-10 0:45:07 |
||
Sample2 |
Database Instance |
Waits by Wait Class |
Database Time Spent Waiting (%) |
事件类 "Other" 的度量 "Database Time Spent Waiting (%)" 位于 64.10273 |
2008-12-10 0:44:42 |
|
Sample |
Cluster Database |
Invalid Objects by Schema |
Owner's Invalid Object Count |
2008-12-9 9:31:08 |
解决步骤:
1、 用下面的语句组装生成清除警告信息的脚本
select 'exec em_severity.delete_current_severity(''' || target_guid ||''',''' || metric_guid || ''',''' || key_value || ''');' from sysman.MGMT_CURRENT_SEVERITY
'EXECEM_SEVERITY.DELETE_CURRENT_SEVERITY('''||TARGET_GUID||''','''||METRIC_GUID|
--------------------------------------------------------------------------------
exec em_severity.delete_current_severity('01BA0082955EC11184C650961DC16313','86821B5F0CE858D6E4A7F7390E88B73C',' ');
exec em_severity.delete_current_severity('6DB37247A7C97ED3ED8BAA58B26CA47A','C733EA1CFA96377F492528E305462C9D','Other');
exec em_severity.delete_current_severity('6DB37247A7C97ED3ED8BAA58B26CA47A','D6438569B496BC9205481E8A70F92F1E','SYS_p550b');
exec em_severity.delete_current_severity('6F95E72E3550CDA14CA88B085851A52C','2448AD7604076832840D5B18E562B9C2','ADCPHC');
3 rows selected.
2、以sysman用户login SQLPLUS 后执行上一步生成的脚本(注意是sysman用户,用sys不行)
Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
Connected as SYSMAN
SQL> exec em_severity.delete_current_severity('FC17617395481D6B11DED9FE7CA63BF8','D6438569B496BC9205481E8A70F92F1E','SYS_p550a');
PL/SQL procedure successfully completed
SQL>
可能出现的问题:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'EM_SEVERITY.DELETE_CURRENT_SEVERITY' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
问题原因及处理:可能你用sys登录执行了脚本,必须以sysman登录执行
Oracle中用户的默认密码
system/manager
sys/change_on_install
oem中:
sysman/oem_temp