Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Alert log File (External tables)
Ryan Gaffuri wrote:
>
> "Ron" <support_at_dbainfopower.com> wrote in message news:<qYSdnVX9i89EHbHdRVn-hg_at_comcast.com>...
> > Here you go:
> >
> > 1. create directory BDUMP as '...';
> >
> > 2. create table alert_log ( text varchar2(80) )
> > organization external (
> > type oracle_loader
> > default directory BDUMP
> > access parameters (
> > records delimited by newline
> > )
> > location('<alert.log>')
> > )
> > reject limit 1000;
> > Regards,
> >
> > Ron
> > DBA Infopower
> > http://www.dbainfopower.com
> > Standard disclaimer:
> > http://www.dbainfopower.com/dbaip_advice_disclaimer.html
> >
> >
> >
> > "MATHEW KING" <bzbzzb_at_hotmail.com> wrote in message
> > news:528c8daf.0402122337.7c05f264_at_posting.google.com...
> > > Hi Every one,
> > >
> > > I want to copy all the contents of An Oracle ALERT Log file in an
> > > Oracle table dynamically.
> > > Every time when I run the routine it append the text from alert log
> > > file into an Oracle table.
> > > Could someone give me suggestion how should it possible.
> > > Should I create and use external tables or procedure to do that.
> > >
> > > Any ideas will be appreciated.
> > >
> > > Regards
> > >
> > > M.King
>
> instead of loading the alert log into a table i find it easy to do the
> following:
>
> 1. make a copy of your alert log.
> 2. at a designated point in time(I do it every 5 minutes) do a diff
> between your last copy and your current alert log, redirect output to
> a file
> 3. grep for 'ORA' and/or whatever keyword you want.
> 4. If anything comes back email the diff to yourself.
> 5. Make another copy of your alert log and overwrite your previous
> one.
>
> does anyone have a better method?
A similar option is:
dd if=alert.log skip=1 bs=<file_size_last_time_I_checked>
hth
connor
-- ------------------------------- Connor McDonald http://www.oracledba.co.uk Co-Author: "Mastering Oracle PL/SQL - Practical Solutions"Received on Wed Feb 18 2004 - 09:00:41 CST