alert log:
Code: Select all
Mon Sep 30 11:26:56 SST 2013
Errors in file /opt/ora10g/admin/ACERUAT/udump/aceruat_ora_16453.trc:
ORA-00600: internal error code, arguments: [kokegPinLob1], [], [], [], [], [], [], []
Thread 1 advanced to log sequence 2744 (LGWR switch)
Current log# 3 seq# 2744 mem# 0: /ACER/ACERUAT/oradata/redo03a.log
Current log# 3 seq# 2744 mem# 1: /ACER/ACERUAT/oradata/redo03b.log
ORA-00600: internal error code, arguments: [kokegPinLob1], [], [], [], [], [], [], []
Mon Sep 30 20:49:55 SST 2013
Thread 1 advanced to log sequence 2748 (LGWR switch)
Current log# 3 seq# 2748 mem# 0: /ACER/ACERUAT/oradata/redo03a.log
Current log# 3 seq# 2748 mem# 1: /ACER/ACERUAT/oradata/redo03b.log
expected result used to be is:
Code: Select all
Mon Sep 30 11:26:56 SST 2013
ORA-00600: internal error code, arguments: [kokegPinLob1], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [kokegPinLob1], [], [], [], [], [], [], []
meaning, under each timestamp, it will find all the ora- errors and format as above.
Now after patching the database, the timestamp has become like this without the SST
Code: Select all
Mon Sep 30 11:26:56 2013
Errors in file /opt/ora10g/admin/ACERUAT/udump/aceruat_ora_16453.trc:
ORA-00600: internal error code, arguments: [kokegPinLob1], [], [], [], [], [], [], []
Mon Sep 30 20:49:55 2013
Thread 1 advanced to log sequence 2748 (LGWR switch)
Current log# 3 seq# 2748 mem# 0: /ACER/ACERUAT/oradata/redo03a.log
Current log# 3 seq# 2748 mem# 1: /ACER/ACERUAT/oradata/redo03b.log
Thus no longer print out any timestamp with it associated ORA-errors if there is.
code:
Code: Select all
for /F "tokens=1,2,3*" %%i in (%File_dbname%) do (
for %%A in (%%l) do (
echo **********************************************************************>>%output-file%
echo %%A DB daily check ORA-ERROR at %%i>>%output-file%
echo **********************************************************************>>%output-file%
echo .>>%output-file%
echo .>>%output-file%
REM if NOT exist alert_%%A.log (
REM echo alert_%%A.log Not found>>%output-file%
REM )
:: print out all ORA- errors along with their associated timestamps
findstr /br "Sun\> Mon\> Tue\> Wed\> Thu\> Fri\> Sat\> ORA-[0-9]*:" alert_%%A.log|findstr /r "!LF!ORA- ^ORA-">>%output-file%
If ERRORLEVEL 1 echo NO ORA- error found in alert_%%A.log>>%output-file%
echo .>>%output-file%
echo .>>%output-file%
)
)