Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Get alerts that are only 30 days old

faraz-dbaFeb 23 2015 — edited Feb 23 2015

Hi I want to query the alerts V$DIAG_ALERT_EXT from, but I only want those that are not older than 30 days V$DIAG_ALERT_EXT.

Right now I have:

select to_char(originating_timestamp,'DD.MM.YYYY HH24:MI:SS'), message_text

  from V$DIAG_ALERT_EXT

  where trim(COMPONENT_ID)='rdbms'

  and MESSAGE_TEXT like '%ORA-%'

  or MESSAGE_TEXT like '%TNS-%'

  or MESSAGE_TEXT like '%Checkpoint not%'

  and originating_timestamp < sysdate-interval '30' day

  order by 1;

But this is not working :/

This post has been answered by Frank Kulash on Feb 23 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 23 2015
Added on Feb 23 2015
2 comments
826 views