How To View Contents of the Alert Log using a Query [message #676970] |
Fri, 02 August 2019 12:38 |
wtolentino
Messages: 421 Registered: March 2005
|
Senior Member |
|
|
how can I view the contents of the alert log using a query? I googled found this X$DBGALERTEXT but apparently it does not exists. I checked using the view dba_objects and that view does not exists. is there any view/table for the alert log? thank you.
|
|
|
|
|
Re: How To View Contents of the Alert Log using a Query [message #676974 is a reply to message #676970] |
Fri, 02 August 2019 13:30 |
|
JPBoileau
Messages: 88 Registered: September 2017
|
Member |
|
|
This gets me everything, including the date and time, from the alert log. I get it for the last 24 hours, in this case.
SELECT CASE
WHEN LAG (
TO_CHAR (CAST (ORIGINATING_TIMESTAMP AS DATE),
'YYYY-MM-DD HH24:MI:SS'),
1,
0)
OVER (ORDER BY ORIGINATING_TIMESTAMP) =
TO_CHAR (CAST (ORIGINATING_TIMESTAMP AS DATE),
'YYYY-MM-DD HH24:MI:SS')
THEN
NULL
ELSE
TO_CHAR (CAST (ORIGINATING_TIMESTAMP AS DATE),
'YYYY-MM-DD HH24:MI:SS')
END
AS TS,
MESSAGE_TEXT
FROM SYS.VW_X$DBGALERTEXT
WHERE ORIGINATING_TIMESTAMP BETWEEN SYSDATE - 1 AND SYSDATE
ORDER BY ORIGINATING_TIMESTAMP;
JP
|
|
|
|
|
|
|
|
|
|
|