转载http://www.jb51.cc/article/p-akmaxoyj-ku.html
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('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','SYS_p550a');
PL/sql procedure successfully completed
sql>commit;
可能出现的问题:
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
原文链接:https://www.f2er.com/oracle/210861.html