#!/bin/bash
sqlplus / as sysdba << EOF
spool spool.log
alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
select sysdate from dual;
EXECUTE DBMS_LOGMNR.START_LOGMNR(STARTTIME => '2014-10-05 18:09:23', ENDTIME => '2014-10-05 18:14:23',OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG + DBMS_LOGMNR.CONTINUOUS_MINE);
select filename from v\$logmnr_logs;
execute dbms_logmnr.start_logmnr(dictfilename => '/u01/log/logminer_dict.dat');
SELECT sql_redo FROM v\$logmnr_contents where username='EISOO';
EXECUTE DBMS_LOGMNR.END_LOGMNR;
sqlplus / as sysdba << EOF
spool spool.log
alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
select sysdate from dual;
EXECUTE DBMS_LOGMNR.START_LOGMNR(STARTTIME => '2014-10-05 18:09:23', ENDTIME => '2014-10-05 18:14:23',OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG + DBMS_LOGMNR.CONTINUOUS_MINE);
select filename from v\$logmnr_logs;
execute dbms_logmnr.start_logmnr(dictfilename => '/u01/log/logminer_dict.dat');
SELECT sql_redo FROM v\$logmnr_contents where username='EISOO';
EXECUTE DBMS_LOGMNR.END_LOGMNR;
spool off
quit
EOF