Re: External Tables - Help Please
Date: Mon, 21 Sep 2009 09:30:22 -0700
Message-ID: <bf46380909210930l76c3bcearc7217a1594abad94_at_mail.gmail.com>
One method to try is to write a timestamp to the alert log at the beginning of each day. Then just return
the rows following the timestamp.
eg:
begin
sys.dbms_system.ksdwrt(2,'ALERT LOG TIMESTAMP: ' ||
to_char(sysdate,'mm/dd/yyyy hh24:mi'));
end;
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
Oracle Blog: http://jkstill.blogspot.com
Home Page: http://jaredstill.com
On Mon, Sep 21, 2009 at 8:58 AM, BN <bnsarma_at_gmail.com> wrote:
> Greetings
>
> I am using Oracle external tables to read alert log to display the content
> on a webpage
>
> Oracle Version :oracle 9.2.0.4 and oracle10grel2
>
> Looking for a sql to read Today's alert log contents only,
>
> Looked at uinsg AWK to create just todays file only, unless I run this
> every 2 mins or so, I wont see the latest alertlog info, dont want to go
> this route unless
> there is no other option
>
> Here is the SQL right now I am using to read last 100 lines, even this the
> Timestamp comes after the messages becase of DESC, not in the right order
>
> select rownum,text as "alert_${DB}.log" from
> (select alert_log.text, rank() over (order by rownum desc) r from
> alert_log)
> where r <= 100
>
> Appreciate your help
> --
> Regards & Thanks
> BN
>
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Sep 21 2009 - 11:30:22 CDT