Skip to main content

Querying the Alert Log

As is with most things, the story BEFORE the story is the most interesting. But, I'm going to save that for another time.

So, I was troubleshooting a performance issue on a new RAC database and I wanted to see that alert log. Rather than dig around in the file system, I found you can query an X$ table for the contents of the alert log; a blog post by Tanel Poder showed me the way.

But this post was for 11g, and ROWNUM <= x is so 11g. So I added my favorite 12c SQL feature: FETCH FIRST 10 ROWS ONLY;



And, if it's not in the last 10 rows, maybe it's in the next 10 row.

And if you really need some help digging into the alert log, you can use some analytics and text mining functions to do more of the work, if SED, AWK and GREP aren't your thing.

Comments