当前位置: 首页 > 工具软件 > dict_build > 使用案例 >

LogMiner_DDL_DICT_TRACKING

艾宏远
2023-12-01
#!/bin/bash

sqlplus / as sysdba << EOF

spool spool.log

execute dbms_logmnr_d.build(dictionary_filename => 'logminer_dict.dat',dictionary_location => '/u01/log',options => dbms_logmnr_d.store_in_flat_file);

alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';

select sysdate from dual;

execute dbms_logmnr.add_logfile('/u01/app/oracle/oradata/orcl/redo1.log',DBMS_LOGMNR.new );
execute dbms_logmnr.add_logfile('/u01/app/oracle/oradata/orcl/redo2.log',DBMS_LOGMNR.addfile);
execute dbms_logmnr.add_logfile('/u01/app/oracle/oradata/orcl/redo3.log',DBMS_LOGMNR.addfile);
execute dbms_logmnr.add_logfile('/u01/app/oracle/oradata/orcl/redo4.log',DBMS_LOGMNR.addfile);


select filename from v\$logmnr_logs;

execute dbms_logmnr.start_logmnr(dictfilename => '/u01/log/logminer_dict.dat');

EXECUTE DBMS_LOGMNR.START_LOGMNR(OPTIONS =>DBMS_LOGMNR.DDL_DICT_TRACKING );

SELECT sql_redo FROM v\$logmnr_contents where username='EISOO';

EXECUTE DBMS_LOGMNR.END_LOGMNR;

spool off

quit

EOF

 类似资料:

相关阅读

相关文章

相关问答