How to find error message from OMS repository

OEM或者OMS管理工具为我们提供了方便的访问数据库度量告警和错误信息的界面,那么我们是否可以通过手动查询的方式来直接查看这些信息呢?答案是肯定的,这需要我们对OMS repository有一定的了解:

SQL> desc sysman.MGMT_CURRENT_METRIC_ERRORS;
Name					   Null?    Type
----------------------------------------- -------- ----------------------------
TARGET_GUID				   NOT NULL RAW(16)
METRIC_GUID				   NOT NULL RAW(16)
COLL_NAME				   NOT NULL VARCHAR2(64)
AGENT_GUID				   NOT NULL RAW(16)
COLLECTION_TIMESTAMP			   NOT NULL DATE
METRIC_ERROR_MESSAGE				    VARCHAR2(4000)
METRIC_ERROR_TYPE				    NUMBER(1)
/* MGMT_CURRENT_METRIC_ERRORS记录了当前出现在OMS console中的度量错误记录 */
SQL> desc sysman.MGMT_METRIC_ERRORS;
Name					   Null?    Type
----------------------------------------- -------- ----------------------------
TARGET_GUID				   NOT NULL RAW(16)
METRIC_GUID				   NOT NULL RAW(16)
COLL_NAME				   NOT NULL VARCHAR2(64)
AGENT_GUID				   NOT NULL RAW(16)
COLLECTION_TIMESTAMP			   NOT NULL DATE
METRIC_ERROR_MESSAGE				    VARCHAR2(4000)
METRIC_ERROR_TYPE				    NUMBER(1)
/* MGMT_METRIC_ERRORS为度量错误历史记录 */
SQL> SELECT METRIC_ERROR_MESSAGE,COLLECTION_TIMESTAMP,METRIC_ERROR_TYPE FROM MGMT_CURRENT_METRIC_ERRORS WHERE COLLECTION_TIMESTAMP<'20-Mar-11';
METRIC_ERROR_MESSAGE				   COLLECTIO METRIC_ERROR_TYPE
-------------------------------------------------- --------- -----------------
Missing Properties : [SQLINPARAM1]		   03-MAR-11		     0
Missing Properties : [SQLINPARAM1]		   03-MAR-11		     0
Missing Properties : [SQLINPARAM1]		   03-MAR-11		     0
Missing Properties : [SQLINPARAM1,SQLINPARAM4]	   03-MAR-11		     0
Missing Properties : [SQLINPARAM1]		   03-MAR-11		     0
Missing Properties : [SQLINPARAM1]		   03-MAR-11		     0
Missing Properties : [SQLINPARAM1]		   03-MAR-11		     0
Missing Properties : [SQLINPARAM1]		   03-MAR-11		     0
Missing Properties : [SQLINPARAM1]		   03-MAR-11		     0
Result has repeating key value : OCM_APPLY,apply   05-MAR-11		     0
/* 以上查询显示了3月20前出现的仍在console中的信息记录 */
SQL> desc sysman.mgmt$alert_current;
Name					   Null?    Type
----------------------------------------- -------- ----------------------------
TARGET_NAME				   NOT NULL VARCHAR2(256)
TARGET_TYPE				   NOT NULL VARCHAR2(64)
TARGET_GUID				   NOT NULL RAW(16)
VIOLATION_GUID 				    RAW(16)
METRIC_NAME				   NOT NULL VARCHAR2(64)
METRIC_COLUMN				   NOT NULL VARCHAR2(64)
METRIC_GUID				   NOT NULL RAW(16)
METRIC_LABEL					    VARCHAR2(64)
COLUMN_LABEL					    VARCHAR2(256)
KEY_VALUE					    VARCHAR2(256)
KEY_VALUE2					    VARCHAR2(256)
KEY_VALUE3					    VARCHAR2(256)
KEY_VALUE4					    VARCHAR2(256)
KEY_VALUE5					    VARCHAR2(256)
COLLECTION_TIMESTAMP				    DATE
ALERT_STATE					    VARCHAR2(18)
VIOLATION_LEVEL			   NOT NULL NUMBER
VIOLATION_TYPE 				    VARCHAR2(19)
MESSAGE					    VARCHAR2(4000)
MESSAGE_NLSID					    VARCHAR2(64)
MESSAGE_PARAMS 				    VARCHAR2(4000)
ACTION_MESSAGE 				    VARCHAR2(4000)
ACTION_MESSAGE_NLSID				    VARCHAR2(64)
ACTION_MESSAGE_PARAMS				    VARCHAR2(4000)
TYPE_DISPLAY_NAME				    VARCHAR2(128)
CURRENT_VALUE					    VARCHAR2(1024)
/* mgmt$alert_current记录当前Grid中活跃的警告信息,类似的mgmt$alert_history为其历史记录表 */
SQL> select target_name,message from SYSMAN.mgmt$alert_current;
TARGET_NAME	     MESSAGE
-------------------- ----------------------------------------------------------------------------------------------------
nas:3872	     Difference between OMS system time and Agent system time is 7680 mins and has exceeded the critical
threshold 120 mins
rh3:3872	     Agent Virtual Memory Growth is 1.53%
rh3:3872	     Count of targets not uploading exceeded the critical threshold (0). Current value: 2
EMREP_rh3	     User SYS logged on from rh3.oracle.com.
LSN1_rh3	     The listener is down: TNS-12541: TNS:no listener .
rh6:3872	     Difference between OMS system time and Agent system time is 7199 mins and has exceeded the critical
threshold 120 mins
Management Services  Management Service Status for nas:4889_Management_Service exceeded the critical threshold (DOWN). Cu
and Repository	     rrent value: DOWN

Comment

*

沪ICP备14014813号

沪公网安备 31010802001379号