写在前面,在研究Oracle logmnr 的时候看到 http://www.askmaclean.com/archives/dbms_logmnr-unsupported-sqlredo.html 的文章,其中有一句

不知道maclean测试的是哪个版本的数据库,我测试的情况是可以的。

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

查看是否启用 supplemental log

SQL> select supplemental_log_data_min from v$database;

SUPPLEME
--------
NO SQL>

创建测试实例

[oracle@localhost ~]$ sqlplus scott/tiger

SQL*Plus: Release 11.2.0.1.0 Production on Sat Oct 11 02:00:49 2014

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> set linesize 180;
SQL> set pagesize 80;
SQL> select table_name from user_tables; TABLE_NAME
------------------------------
DEPT
EMP
BONUS
SALGRADE
DEPT_2 SQL> create table emp2 as select * from emp where 1 =2; Table created. SQL> insert into emp2 select * from emp; 14 rows created. SQL> commit; Commit complete. SQL> delete from emp where deptno =30; 6 rows deleted. SQL> commit; Commit complete.

查看测试结果

SQL> begin                                                                                                                  2  dbms_logmnr.add_logfile(logfilename=>'/u01/app/flash_recovery_area/ORCL/archivelog/2014_10_11/o1_mf_1_12_b3kwq3qz_.arc',options=>dbms_logmnr.NEW);
3 dbms_logmnr.add_logfile(logfilename=>'/u01/app/flash_recovery_area/ORCL/archivelog/2014_10_11/o1_mf_1_11_b3kv67v1_.arc',options=>dbms_logmnr.ADDFILE);
4 end;
5 / PL/SQL procedure successfully completed. SQL> select sql_redo from v$logmnr_contents t where t.seg_name ='EMP2';
select sql_redo from v$logmnr_contents t where t.seg_name ='EMP2'
*
ERROR at line 1:
ORA-01306: dbms_logmnr.start_logmnr() must be invoked before selecting from v$logmnr_contents SQL> execute dbms_logmnr.start_logmnr(options=> dbms_logmnr.dict_from_online_catalog + dbms_logmnr.committed_data_only); PL/SQL procedure successfully completed. SQL> select sql_redo from v$logmnr_contents t where t.seg_name ='EMP2'; SQL_REDO
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
create table emp2 as select * from emp where 1 =2;
insert into "SCOTT"."EMP2"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('','SMITH','CLERK','',TO_DATE('17-DEC-80', 'DD-MON-RR'),'',NULL,'');
insert into "SCOTT"."EMP2"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('','ALLEN','SALESMAN','',TO_DATE('20-FEB-81', 'DD-MON-RR'),'','','30
'); insert into "SCOTT"."EMP2"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('','WARD','SALESMAN','',TO_DATE('22-FEB-81', 'DD-MON-RR'),'','',''
); insert into "SCOTT"."EMP2"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('','JONES','MANAGER','',TO_DATE('02-APR-81', 'DD-MON-RR'),'',NULL,'')
; SQL_REDO
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
insert into "SCOTT"."EMP2"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('','MARTIN','SALESMAN','',TO_DATE('28-SEP-81', 'DD-MON-RR'),'','',''); insert into "SCOTT"."EMP2"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('','BLAKE','MANAGER','',TO_DATE('01-MAY-81', 'DD-MON-RR'),'',NULL,'')
; insert into "SCOTT"."EMP2"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('','CLARK','MANAGER','',TO_DATE('09-JUN-81', 'DD-MON-RR'),'',NULL,'')
; insert into "SCOTT"."EMP2"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('','SCOTT','ANALYST','',TO_DATE('19-APR-87', 'DD-MON-RR'),'',NULL,'')
; SQL_REDO
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ insert into "SCOTT"."EMP2"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('','KING','PRESIDENT',NULL,TO_DATE('17-NOV-81', 'DD-MON-RR'),'',NULL,'');
insert into "SCOTT"."EMP2"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('','TURNER','SALESMAN','',TO_DATE('08-SEP-81', 'DD-MON-RR'),'','',''
); insert into "SCOTT"."EMP2"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('','ADAMS','CLERK','',TO_DATE('23-MAY-87', 'DD-MON-RR'),'',NULL,'');
insert into "SCOTT"."EMP2"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('','JAMES','CLERK','',TO_DATE('03-DEC-81', 'DD-MON-RR'),'',NULL,'');
insert into "SCOTT"."EMP2"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('','FORD','ANALYST','',TO_DATE('03-DEC-81', 'DD-MON-RR'),'',NULL,'');
insert into "SCOTT"."EMP2"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('','MILLER','CLERK','',TO_DATE('23-JAN-82', 'DD-MON-RR'),'',NULL,''); 15 rows selected.

同样 对于david 的文章貌似也存在描述的不妥的情况

http://blog.csdn.net/tianlesoftware/article/details/6554674

不知道是不是也是测试的环境不同。

还是说我的测试具有偶然性。

经过测试至少可以证明几件事情:(基于当前测试环境 Oracle 11.2)

1.必须要创建utl_file_dir,创建之后必须重启数据库。

2.即便是没有启用supplemental log,在没有其他更好的办法的时候还是可以尝试logmnr恢复特定表的特定数据。

Oracle Database does not provide any supplemental logging, which means that by default LogMiner is not usable的更多相关文章

  1. GitHub: Oracle Database on Docker 为测试 改天试试

    Oracle Database on Docker https://github.com/oracle/docker-images/tree/master/OracleDatabase/SingleI ...

  2. Oracle补全日志(Supplemental logging)

    Oracle补全日志(Supplemental logging)特性因其作用的不同可分为以下几种:最小(Minimal),支持所有字段(all),支持主键(primary key),支持唯一键(uni ...

  3. Oracle® Database Patch 19121551 - Database Patch Set Update 11.2.0.4.4 (Includes CPUOct2014) - 傲游云浏览

    Skip Headers Oracle® Database Patch 19121551 - Database Patch Set Update 11.2.0.4.4 (Includes CPUOct ...

  4. Supplemental Logging

    Supplemental Logging分为两种:Database-Level Supplemental Logging和Table-Level Supplemental Logging,即数据库级别 ...

  5. P6 EPPM Manual Installation Guide (Oracle Database)

    P6 EPPM Manual Installation Guide (Oracle Database) P6 EPPM Manual Installation Guide (Oracle Databa ...

  6. 使用 Oracle GoldenGate 在 Microsoft SQL Server 和 Oracle Database 之间复制事务

    使用 Oracle GoldenGate 在 Microsoft SQL Server 和 Oracle Database 之间复制事务 作者:Nikolay Manchev 分步构建一个跨这些平台的 ...

  7. Ways to access Oracle Database in PostgreSQL

    Today, organizations stores information(data) in different database systems. Each database system ha ...

  8. Oracle Database 11g Express Edition 使用小结(windows)

    如何启动oraclewindows系统服务中有一个服务叫:[OracleService[SID]]SID是你安装oracle xe时候的实例名,如果你没有改默认的是[XE], OracleServic ...

  9. Oracle Database 12c Using duplicate standby database from active database Created Active DataGuard

    primary database db_name=zwc, db_unique_name=zwc standby database db_name=zwc, db_unique_name=standb ...

随机推荐

  1. 返回类型和return语句

    return语句终止当前正在执行的函数并将控制权返回到调用该函数的地方.return语句有两种形式: return; return expression; 无返回值函数 没有返回值的return语句只 ...

  2. 说说log4cplus

    <C++ primer 第五版>已经翻了一段时间了,每天早上的班车上看一个小时.书是好书,可惜很多知识还是停留在表面上.每天除了翻书,一是也找到不合适的方法进一步深入,晚上看到新闻联播的老 ...

  3. C# 之 后台加载图片Image

    命名空间为 System.Drawing ,Image.FromFile  一旦使用后,对应的文件在一直调用其生成的Image对象被Disponse前都不会被解除锁定,这就造成了一个问题,就是在这个图 ...

  4. 自定义控件(视图)1期笔记02:View的绘制流程

    1. 引言: 来自源码的3个方法: (1)public final void measure():测量,用来控制控件的大小,final不建议覆写 (2)public void layout():布局, ...

  5. Android更改imagebutton为纯色方法

    我的imagebutton所用的背景png图片是灰色的,但是我想让他显示出来是白色的按钮,如果用ps去一个个填充不太现实,那有没有什么办法去通过xml里的属性改变背景颜色呢? 一开始我用了网上的方法 ...

  6. Unix网络编程(3)——C/S模型几种情况

    UNP第五章描述了在客户端和服务器连接建立之后会出现的几种情况,并给出了解决方案,做一个简单的总结. 先给出这个简单的回射C/S程序的模型如下图.   1.客户端和服务器正常终止连接 客户端从标准输入 ...

  7. SQL Server用存储过程新建视图

    CREATE PROCEDURE [dbo].[p_GetV_view]ASBEGIN DECLARE @sqlstr1 varchar(255) DECLARE @sqlstr2 varchar(2 ...

  8. mig_ddr4_ultrascale

    http://china.xilinx.com/support/documentation-navigation/design-hubs/dh0061-ultrascale-memory-interf ...

  9. yii下使用oracle中文都变成问号乱码的解决方法

    在配置文件中,一般会用以下配置: 'db_oracle'=>array( 'class' => 'CDbConnection', 'connectionString'=>'oci:d ...

  10. dagger和butterknife使用冲突

    两者会冲突的主要原因是因为两者都有:javax.annotation.processing.Processor 于是在build.gradle中添加如下配置即可: // 注释冲突 packagingO ...