1、选定Logminer字典
Oracle提供了三种方式选定Logminer字典
(1)使用在线目录
EXECUTE DBMS_LOGMNR.START_LOGMNR(OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG);
(2)抽取字典到redo日志文件中
EXECUTE DBMS_LOGMNR_D.BUILD( OPTIONS=> DBMS_LOGMNR_D.STORE_IN_REDO_LOGS);
(3)抽取字典到平面文件中
这种方式需要设置UTL_FILE_DIR参数,并且重启数据库
EXECUTE DBMS_LOGMNR_D.BUILD('dictionary.ora', '/oradata/', DBMS_LOGMNR_D.STORE_IN_FLAT_FILE);
2、Logminer中添加归档日志文件,也可以添加redo文件
EXECUTE DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/arch/1_1_836472539.arch', OPTIONS => DBMS_LOGMNR.NEW);
3、继续添加归档文件后者redo文件
EXECUTE DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/arch/1_2__836472539.arch', OPTIONS => DBMS_LOGMNR.ADDFILE);
EXECUTE DBMS_LOGMNR.ADD_LOGFILE( LOGFILENAME => '/arc