How To View Contents of the Alert Log using a Query [message #676970] |
Fri, 02 August 2019 12:38 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
wtolentino
Messages: 404 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 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/06f726c8b1b832b32c066e2ddee7d54e?s=64&d=mm&r=g) |
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
|
|
|
|
|
|
|
|
|
|
|