There is a log of events where any garbage falls, for example:
Fri Feb 21 04:50:53 2014 Thread 1 cannot allocate new log, sequence 13184 Private strand flush not complete Current log# 3 seq# 13183 mem# 0: /opt/oracle/admin/BITS/redolog/redo03.log Thread 1 advanced to log sequence 13184 Current log# 4 seq# 13184 mem# 0: /opt/oracle/admin/BITS/redolog/redo04.log Fri Feb 21 04:51:02 2014 LNS: Standby redo logfile selected for thread 1 sequence 13184 for destination LOG_ARCHIVE_DEST_1 Fri Feb 21 05:00:53 2014 Thread 1 cannot allocate new log, sequence 13185 Private strand flush not complete Current log# 4 seq# 13184 mem# 0: /opt/ora/admin/Bнн/redolog/redo04.log Thread 1 advanced to log sequence 13185 Current log# 3 seq# 13185 mem# 0: /opt/ora/admin/Bнн/redolog/redo03.log Fri Feb 21 05:00:57 2014 LNS: Standby redo logfile selected for thread 1 sequence 13185 for destination LOG_ARCHIVE_DEST_1 It contains records that are needed and interesting, for example:
ORA-0155 caused by SQL statement below (SQL ID: 39c4440, Query Duration=13923299 sec, SCN: 0x0001.48500a): SELECT * FROM RELATIONAL("BILL"."REQUEST") The value (30) of MAXTRANS parameter ignored. kupprdp: master process DM00 started with pid=100, OS id=11330 to execute - SYS.KUPM$MCP.MAIN('SYS_EXPORT_FULL_06', 'SYS', 'KUPC$C_1_201402210646', 'KUPC$S_1_2014021064146', 0); kupprdp: worker process DW01 started with worker id=1, pid=109, OS id=11332 to execute - SYS.KUPW$WORKER.MAIN('SYS_ERT_FULL_06', 'SYS'); ALTER SYSTEM SET undo_retention=90 SCOPE=BOTH; Now I just filter all the garbage lines through the in operator, but the problem remains with the fact that the dates are not so filtered.
Here is an exemplary implementation of what I got:
with open(log_filename, 'r') as log_file: for line in log_file.readlines(): if 'LNS: Standby redo logfile selected for thread' not in line: if '...' not in line: ... print(line) Is there an example of solving a similar filtering problem along with dates?