虽然讲生产库上DDL 操作很少,但是这个extract directory to redo 操作也还是有风险的。 所以可行性最高的还是我们的第三种方法。
1.2.3 Extracting the LogMiner Dictionary to a Flat File
When the LogMiner dictionary is in a flat file, fewer system resources are used than when it is contained in the redo log files. Oracle recommends that you regularly back up the dictionary extract to ensure correct analysis of older redo log files.
Be sure that no DDL operations occur while the dictionary is being built.
同样需要启动supplemental log。 在extract to online redo的时候,Oracle会限制DDL 执行,直到directory extract 结束。 而extract to flat file的话,就需要用户来保证这个一致性了。 而且每次进行挖掘的时候都需要extract一次,从而保证一致性。
这种方法的致命伤是需要设置 UTL_FILE_DIR参数,而该参数的生效必须重启DB。
我们这里就是用extract to flat file来来演示数据恢复。