[TriLUG] Regexp Help

Alan Sterger asterger at earthlink.net
Tue Aug 12 15:45:04 EDT 2014


Hello Listers,

Analyzing an Oracle alert_log.  Familiar with sed, grep and regular 
expressions but processing across multiple lines has always been my 
nemesis.  What I'm trying to accomplish is to printout blocks of lines 
to a smaller file for analysis.

Thanks for your help,

- Alan S.

Alert log fragment:
******************************************************************
Tue Mar 25 19:48:43 2014
   Current log# 3 seq# 141753 mem# 1: F:\ORADATA\NCP15\REDO03B.LOG
Tue Mar 25 19:48:47 2014
ARC0: Completed archiving  log 2 thread 1 sequence 141752
Tue Mar 25 19:52:17 2014
Errors in file d:\oracle\admin\ncp15\udump\ncp15_j000_5824.trc:
ORA-12012: error on auto execute of job 216103
ORA-30926: unable to get a stable set of rows in the source tables
ORA-06512: at "ENTREF.BGNPOSTLOAD", line 156
ORA-06512: at line 2

Tue Mar 25 19:56:51 2014
Thread 1 advanced to log sequence 141754
Tue Mar 25 19:56:51 2014
ARC0: Evaluating archive   log 3 thread 1 sequence 141753
Tue Mar 25 19:56:51 2014
   Current log# 1 seq# 141754 mem# 0: F:\ORADATA\NCP15\REDO01A.LOG
   Current log# 1 seq# 141754 mem# 1: F:\ORADATA\NCP15\REDO01B.LOG
******************************************************************

Preferred output:
Tue Mar 25 19:52:17 2014
ORA-12012: error on auto execute of job 216103
ORA-30926: unable to get a stable set of rows in the source tables
ORA-06512: at "ENTREF.BGNPOSTLOAD", line 156
ORA-06512: at line 2


Needed information:
DOW & timestamp line
all ORA- lines

"Errors in file" line can be removed/skipped as well as the ORA- 
terminating whitespace line.















More information about the TriLUG mailing list