Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to see alert entries from stored procedure

Re: How to see alert entries from stored procedure

From: Woody McKay <wmckay_at_hydrogenmedia.com>
Date: Fri, 08 Jun 2001 12:04:10 GMT
Message-ID: <_a3U6.2039$c37.238530@newsread1.prod.itd.earthlink.net>

Great suggestion. I'll give it a shot and she what happens.

Thanks,

Woody

"Knut Talman" <knut.talman_at_mytoys.de> wrote in message news:3B1FFD89.C83067C7_at_mytoys.de...
> > You can have your stored procedure execute an Oracle external procedure
> > which could read the alert log and return what you are looking for.
 

> > > Hello all,
> > >
> > > Is there is a way to see alert log entries from within an Oracle 8.1.7
> > > stored procedure?
>
> Modify your UTL_FILE_DIR entry in init.ora, that you can also read the
> directory where alert.log is stored. Then you can open, read and parse
> it with
>
> DECLARE
> v_FileHandle UTL_FILE.FILE_TYPE;
> v_NewLine VARCHAR2(3000);
> BEGIN
> v_FileHandle := UTL_FILE.FOPEN('directory_of', 'alert<SID>.log','r');
> LOOP
> BEGIN
> UTL_FILE.GET_LINE(v_FileHandle, v_NewLine);
> <do some parsing>
> EXCEPTION
> WHEN NO_DATA_FOUND THEN
> EXIT;
> END;
> END LOOP;
> UTL_FILE.FCLOSE(v_FileHandle);
> END;
> /
>
>
> Regards,
>
> Knut
>
> --
> Knut Talman Fon +49 30 72 62 01 411
> dba_at_myToys.de Fax +49 30 72 62 01 222
> The degree of normality in a database is inversely
> proportional to that of its DBA
>
Received on Fri Jun 08 2001 - 07:04:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US