- 最后登录
- 2019-7-8
- 在线时间
- 133 小时
- 威望
- 131
- 金钱
- 1368
- 注册时间
- 2011-10-14
- 阅读权限
- 50
- 帖子
- 126
- 精华
- 1
- 积分
- 131
- UID
- 31
|
1#
发表于 2012-2-21 14:17:50
|
查看: 6305 |
回复: 6
SQL> select GROUP# ,THREAD# ,SEQUENCE# , MEMBERS , ARCHIVED ,STATUS from v$log;
GROUP# THREAD# SEQUENCE# MEMBERS ARC STATUS
---------- ---------- ---------- ---------- --- ----------------
1 1 31 1 YES INACTIVE
2 1 32 1 NO CURRENT
3 1 30 1 YES INACTIVE
SQL> connect clm/clm
Connected.
SQL> delete from test;
5 rows deleted.
SQL> commit;
Commit complete.
SQL> insert into test values(1);
1 row created.
SQL> insert into test values(2);
1 row created.
SQL> commit;
Commit complete.
SQL> connect /as sysdba
Connected.
SQL> select GROUP# ,THREAD# ,SEQUENCE# , MEMBERS , ARCHIVED ,STATUS from v$log;
GROUP# THREAD# SEQUENCE# MEMBERS ARC STATUS
---------- ---------- ---------- ---------- --- ----------------
1 1 31 1 YES INACTIVE
2 1 32 1 NO CURRENT
3 1 30 1 YES INACTIVE
SQL> desc v$logfile;
Name Null? Type
----------------------------------------- -------- ----------------------------
GROUP# NUMBER
STATUS VARCHAR2(7)
TYPE VARCHAR2(7)
MEMBER VARCHAR2(513)
IS_RECOVERY_DEST_FILE VARCHAR2(3)
SQL> select GROUP# ,MEMBER from v$logfile;
GROUP#
----------
MEMBER
--------------------------------------------------------------------------------
1
/home/oracle/app/oradata/ora10/redo01.log
2
/home/oracle/app/oradata/ora10/redo02.log
3
/home/oracle/app/oradata/ora10/redo03.log
SQL> execute dbms_logmnr.add_logfile(logfilename=>'/home/oracle/app/oradata/ora10/redo02.log',options=>dbms_logmnr.addfile);
PL/SQL procedure successfully completed.
SQL> execute dbms_logmnr.start_logmnr(dictfilename=>'/home/oracle/app/logs/dict.ora');
PL/SQL procedure successfully completed.
SQL> create table te1 as select * from GV$LOGMNR_CONTENTS ;
Table created.
SQL> execute dbms_logmnr.end_logmnr;
PL/SQL procedure successfully completed.
但是现在使用logmnr得到的结果是这样的;
select t.sql_redo,t.sql_undo from te1 t where t.table_name='TEST';
SQL_REDO SQL_UNDO
1 insert into "CLM"."TEST"("ID") values ('2'); delete from "CLM"."TEST" where "ID" = '2' and ROWID = 'AAAL5WAAEAAAAAMAAG';
为啥删除了5行数据结果只显示了delete from test where id=2这一条那? |
|