Select from Alert and Listener logs using V$DIAG_ALERT_EXT | ||
# Selecting from the Alert log :- | ||
SQL> select ORIGINATING_TIMESTAMP, MESSAGE_TEXT | ||
from V$DIAG_ALERT_EXT | ||
WHERE ORIGINATING_TIMESTAMP > sysdate -1/24 | ||
and trim(COMPONENT_ID)='rdbms'; | ||
# Selecting from the Listener log :- | ||
SQL> select ORIGINATING_TIMESTAMP,MESSAGE_TEXT | ||
from V$DIAG_ALERT_EXT | ||
WHERE ORIGINATING_TIMESTAMP > sysdate -1/24 | ||
and trim(COMPONENT_ID)='tnslsnr'; | ||
1- First view for rdbms log entries: | ||
create or replace view my_db_alert_log as | ||
select ORIGINATING_TIMESTAMP,HOST_ID,HOST_ADDRESS,DETAILED_LOCATION,MODULE_ID, | ||
CLIENT_ID,PROCESS_ID,USER_ID,MESSAGE_ID,MESSAGE_GROUP,MESSAGE_TEXT,PROBLEM_KEY,FILENAME | ||
from V$DIAG_ALERT_EXT WHERE trim(COMPONENT_ID)='rdbms'; | ||
2- Another one for listener log entries: | ||
create or replace view my_lsnr_alert_log as | ||
select ORIGINATING_TIMESTAMP,HOST_ID,HOST_ADDRESS,DETAILED_LOCATION,MODULE_ID, | ||
CLIENT_ID,PROCESS_ID,USER_ID,MESSAGE_ID,MESSAGE_GROUP,MESSAGE_TEXT,PROBLEM_KEY,FILENAME | ||
from V$DIAG_ALERT_EXT WHERE trim(COMPONENT_ID)='tnslsnr'; | ||
http://blog.contractoracle.com/2013/01/select-from-alert-and-listener-logs.html | ||
http://laurent-leturgez.com/2011/11/16/read-rdbms-and-listener-log-xml-from-sqlplus-prompt/ | ||
http://psoug.org/reference/dyn_perf_view.html | ||
Thursday, 6 February 2014
Alert and Listener logs
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment