SELECT SCN,
       SQL_REDO,
       OPERATION_CODE,
       TIMESTAMP,
       XID,
       CSF,
       TABLE_NAME,
       SEG_OWNER,
       OPERATION,
       USERNAME,
       ROW_ID,
       ROLLBACK,
       RS_ID,
       Ora_hash(SCN
                ||OPERATION
                ||RS_ID
                ||SEQUENCE#
                ||Rtrim(Substr(SQL_REDO, 1, 256)))
FROM   V$LOGMNR_CONTENTS
WHERE  SCN > :1
       AND SCN <= :2
       AND ( ( OPERATION_CODE IN ( 6, 7, 34, 36 ) )
              OR ( ( OPERATION_CODE IN ( 1, 2, 3, 9,
                                         10, 11, 29 )
                      OR ( OPERATION_CODE = 5
                           AND USERNAME NOT IN ( 'SYS', 'SYSTEM' )
                           AND INFO NOT LIKE 'INTERNAL DDL%'
                           AND ( TABLE_NAME IS NULL
                                  OR TABLE_NAME NOT LIKE 'ORA_TEMP_%' ) ) )
                   AND TABLE_NAME != 'LOG_MINING_FLUSH'
                   AND SEG_OWNER NOT IN ( 'APPQOSSYS', 'AUDSYS', 'CTXSYS',
                                          'DVSYS',
                                          'DBSFWUSER', 'DBSNMP',
                                          'GSMADMIN_INTERNAL',
                                          'LBACSYS',
                                          'MDSYS', 'OJVMSYS', 'OLAPSYS',
                                          'ORDDATA',
                                          'ORDSYS', 'OUTLN', 'SYS', 'SYSTEM',
                                          'WMSYS', 'XDB' )
                   AND ( Regexp_like(SEG_OWNER, '^PROTPRD$', 'i') )
                   AND ( Regexp_like(SEG_OWNER
                                     || '.'
                                     || TABLE_NAME, '^PROTPRD.SB1010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SA1010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SB1110$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SA1110$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SA2010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SA4010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SA6010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SB2010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SB3010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SD1010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SD2010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SA3010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SD3010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SF1010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SF2010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SF3010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SF4010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SED010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SBF010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SB7010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SB8010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SC5010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SC6010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SC7010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SC9010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SE1010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SE2010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SE4010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SE5010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.CB7010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.CB8010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SDB010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SBZ010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SDA010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.CD2010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.CD7010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.DA3010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.DA4010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.FI7010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.FRV010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.NNR010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.ZPR010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.ZZ2010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.ZZ3010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.ZZF010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.ZZG010$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.DA3040$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.DA4040$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.DA8040$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.DE5040$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.DT6040$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SA1040$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SE1040$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SF2040$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SA1300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SA2300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SA3300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SA4300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SA6300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SB1300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SB2300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SD1300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SD2300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SD3300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SB7300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SB8300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SBE300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SBF300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SBM300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SBZ300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SC5300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SC6300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SC7300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SC9300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SDA300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SDB300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SE1300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SE2300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SE4300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SE5300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SED300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SF1300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SF2300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SF3300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SF4300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.ZPR300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.ZZ2300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.ZZ3300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.ZZF300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.ZZG300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.CB7300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.CB8300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.CD2300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.CD7300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.NNR300$', 'i')
                          OR Regexp_like(SEG_OWNER
                                         || '.'
                                         || TABLE_NAME, '^PROTPRD.SBM010$', 'i')
                       ) ) ) 