|
- select * from dba_Tables t where t.table_name='TABselect "SEQUENCE_ID","REASON_ID","OWNER","OBJECT_NAME","SUBOBJECT_NAME","OBJECT_TYPE","REASON","TIME_SUGGESTED","CREATION_TIME","SUGGESTED_ACTION","ADVISOR_NAME","METRIC_VALUE","MESSAGE_TYPE","MESSAGE_GROUP","MESSAGE_LEVEL","HOSTING_CLIENT_ID","MODULE_ID","PROCESS_ID","HOST_ID","HOST_NW_ADDR","INSTANCE_NAME","INSTANCE_NUMBER","USER_ID","EXECUTION_CONTEXT_ID","ERROR_INSTANCE_ID","RESOLUTION","PDB_NAME","CON_ID" from INT$dba_alert_history
- select sequence_id,
- reason_id,
- owner,
- object_name,
- subobject_name,
- typnam_keltosd AS object_type,
- dbms_server_alert.expand_message(userenv('LANGUAGE'),
- mid_keltsd,
- reason_argument_1,
- reason_argument_2,
- reason_argument_3,
- reason_argument_4,
- reason_argument_5,
- objidx_keltsd,
- pdb_name) AS reason,
- time_suggested,
- creation_time,
- dbms_server_alert.expand_message(userenv('LANGUAGE'),
- amid_keltsd,
- action_argument_1,
- action_argument_2,
- action_argument_3,
- action_argument_4,
- action_argument_5)
- AS suggested_action,
- advisor_name,
- metric_value,
- decode(message_level, 32, 'Notification', 'Warning')
- AS message_type,
- nam_keltgsd AS message_group,
- message_level,
- hosting_client_id,
- mdid_keltsd AS module_id,
- process_id,
- host_id,
- host_nw_addr,
- instance_name,
- instance_number,
- user_id,
- execution_context_id,
- error_instance_id,
- decode(resolution, 1, 'cleared', 'N/A') AS resolution,
- pdb_name,
- h.con_id as con_id
- FROM wri$_alert_history h, X$KELTSD a, X$KELTOSD, X$KELTGSD,
- dba_advisor_definitions
- WHERE resolution != 2
- AND reason_id = rid_keltsd
- AND otyp_keltsd = typid_keltosd
- AND grp_keltsd = id_keltgsd
- AND aid_keltsd = advisor_id(+)
- ;
- select * from dba_views where view_name=upper('INT$dba_alert_history');
- select * from dba_tables t where t.table_name=upper('wri$_alert_history');
- select substr(t.table_name,3,1), count(*) from dba_tables t
- where t.table_name like 'WR_$\_%' escape '\'
- group by substr(t.table_name,3,1);
复制代码 select "SEQUENCE_ID","REASON_ID","OWNER","OBJECT_NAME","SUBOBJECT_NAME","OBJECT_TYPE","REASON","TIME_SUGGESTED","CREATION_TIME","SUGGESTED_ACTION","ADVISOR_NAME","METRIC_VALUE","MESSAGE_TYPE","MESSAGE_GROUP","MESSAGE_LEVEL","HOSTING_CLIENT_ID","MODULE_ID","PROCESS_ID","HOST_ID","HOST_NW_ADDR","INSTANCE_NAME","INSTANCE_NUMBER","USER_ID","EXECUTION_CONTEXT_ID","ERROR_INSTANCE_ID","RESOLUTION","PDB_NAME","CON_ID" from INT$dba_alert_history
select sequence_id,
reason_id,
owner,
object_name,
subobject_name,
typnam_keltosd AS object_type,
dbms_server_alert.expand_message(userenv('LANGUAGE'),
mid_keltsd,
reason_argument_1,
reason_argument_2,
reason_argument_3,
reason_argument_4,
reason_argument_5,
objidx_keltsd,
pdb_name) AS reason,
time_suggested,
creation_time,
dbms_server_alert.expand_message(userenv('LANGUAGE'),
amid_keltsd,
action_argument_1,
action_argument_2,
action_argument_3,
action_argument_4,
action_argument_5)
AS suggested_action,
advisor_name,
metric_value,
decode(message_level, 32, 'Notification', 'Warning')
AS message_type,
nam_keltgsd AS message_group,
message_level,
hosting_client_id,
mdid_keltsd AS module_id,
process_id,
host_id,
host_nw_addr,
instance_name,
instance_number,
user_id,
execution_context_id,
error_instance_id,
decode(resolution, 1, 'cleared', 'N/A') AS resolution,
pdb_name,
h.con_id as con_id
FROM wri$_alert_history h, X$KELTSD a, X$KELTOSD, X$KELTGSD,
dba_advisor_definitions
WHERE resolution != 2
AND reason_id = rid_keltsd
AND otyp_keltsd = typid_keltosd
AND grp_keltsd = id_keltgsd
AND aid_keltsd = advisor_id(+)
|
|