| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to see alert entries from stored procedure
> 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;
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 Thu Jun 07 2001 - 17:17:45 CDT
![]() |
![]() |