conn lunar/lunar
create table t1 tablespace rogertbs as select * from dba_objects;create table t2 tablespace rogertbs as select * from dba_objects;
create table t3 tablespace rogertbs as select * from dba_objects;
archive log list
SQL> conn lunar/lunar
Connected.
SQL> create table t1 tablespace rogertbs as select * from dba_objects;
Table created.
SQL> create table t2 tablespace rogertbs as select * from dba_objects;
Table created.
SQL> create table t3 tablespace rogertbs as select * from dba_objects;
Table created.
SQL> conn / as sysdba
Connected.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/archive/
Oldest online log sequence 18
Next log sequence to archive 20
Current log sequence 20
SQL> alter system switch logfile;
System altered.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/archive/
Oldest online log sequence 19
Next log sequence to archive 21
Current log sequence 21
SQL> alter system switch logfile;
/
System altered.
SQL>
System altered.
SQL>
SQL>
conn lunar/lunar
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
SQL> conn lunar/lunar
Connected.
SQL> select count(*) from t1;
COUNT(*)
----------
17619
SQL> select count(*) from t2;
COUNT(*)
----------
17620
SQL> select count(*) from t3;
COUNT(*)
----------
17621
SQL>
conn lunar/lunar
delete from t2 where rownum <2;
delete from t3 where rownum <2;
commit;
conn / as sysdba
alter system switch logfile;
archive log list
SQL> conn lunar/lunar
delete from t2 where rownum <2;
delete from t3 where rownum <2;
Connected.
SQL> commit;
1 row deleted.
SQL>
1 row deleted.
SQL>
Commit complete.
SQL>
SQL> conn / as sysdba
alter system switch logfile;
Connected.
SQL> archive log list
System altered.
SQL> Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/archive/
Oldest online log sequence 22
Next log sequence to archive 23
Current log sequence 24
SQL>
SQL>
conn lunar/lunar
delete from t1 where rownum <10001;
commit;
conn / as sysdba
alter system switch logfile;
alter system switch logfile;
alter system switch logfile;
archive log list
SQL> conn / as sysdba
alter system switch logfile;
Connected.
SQL> alter system switch logfile;
alter system switch logfile;
archive log list
System altered.
SQL>
System altered.
SQL>
System altered.
SQL> Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/archive/
Oldest online log sequence 25
Next log sequence to archive 26
Current log sequence 27
SQL> SQL>
SQL>
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> !
cp /test/clonedb/roger01.dbf /test/clonedb/roger01.dbf.bak
[oracle@lunar clonedb]$ ls -lrt /test/clonedb/roger01*
-rw-r----- 1 oracle oinstall 10493952 Aug 16 03:07 /test/clonedb/roger01.dbf
-rw-r----- 1 oracle oinstall 10493952 Aug 16 03:09 /test/clonedb/roger01.dbf.bak
[oracle@lunar clonedb]$
conn / as sysdba
startup
conn lunar/lunar
delete from t1 where rownum <10001;
delete from t2 where rownum <2;
delete from t3 where rownum <2;
commit;
conn / as sysdba
alter system switch logfile;
archive log list
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 530288640 bytes
Fixed Size 2230024 bytes
Variable Size 167774456 bytes
Database Buffers 352321536 bytes
Redo Buffers 7962624 bytes
Database mounted.
Database opened.
SQL> conn lunar/lunar
delete from t1 where rownum <10001;
delete from t2 where rownum <2;
delete from t3 where rownum <2;
commit;
Connected.
SQL>
7619 rows deleted.
SQL>
1 row deleted.
SQL>
1 row deleted.
SQL>
Commit complete.
SQL>
SQL> conn / as sysdba
alter system switch logfile;
archive log list
Connected.
SQL>
System altered.
SQL> Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/archive/
Oldest online log sequence 26
Next log sequence to archive 27
Current log sequence 28
SQL>
alter system switch logfile;
alter system switch logfile;
archive log list;
SQL> alter system switch logfile;
alter system switch logfile;
archive log list;
System altered.
SQL>
System altered.
SQL> Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/archive/
Oldest online log sequence 28
Next log sequence to archive 29
Current log sequence 30
SQL> SQL>
SQL>
[oracle@lunar archive]$ rm 1_22_805858745.dbf 1_23_805858745.dbf
[oracle@lunar archive]$ rm 1_26_805
1_26_805707062.dbf 1_26_805858745.dbf
[oracle@lunar archive]$ rm 1_26_805*
[oracle@lunar archive]$
[oracle@lunar clonedb]$ rm roger01.dbf
[oracle@lunar clonedb]$ ls -lrt roger*
-rw-r----- 1 oracle oinstall 10493952 Aug 16 03:09 roger01.dbf.bak
[oracle@lunar clonedb]$
SQL> conn / as sysdba
Connected.
SQL> shutdown immediate
ORA-01116: error in opening database file 5
ORA-01110: data file 5: '/test/clonedb/roger01.dbf'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@lunar ~]$
[oracle@lunar ~]$
[oracle@lunar ~]$ ss
SQL*Plus: Release 11.2.0.3.0 Production on Thu Aug 16 03:32:52 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 530288640 bytes
Fixed Size 2230024 bytes
Variable Size 167774456 bytes
Database Buffers 352321536 bytes
Redo Buffers 7962624 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/test/clonedb/roger01.dbf'
SQL>
SQL> recover datafile 5;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 5: '/test/clonedb/roger01.dbf'
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
ORA-01110: data file 5: '/test/clonedb/roger01.dbf'
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/archive/
Oldest online log sequence 30
Next log sequence to archive 32
Current log sequence 32
SQL> select open_mode from v$database;
OPEN_MODE
----------------------------------------
MOUNTED
SQL>
set linesize112
set pages 999
col LHNAM for a35
col LHRLS for a15
select LHSEQ,LHNAM,LHRLS,LHRLC from x$kcclh;
SQL> set linesize112
SQL> set pages 999
SQL> col LHNAM for a35
SQL> col LHRLS for a15
SQL> select LHSEQ,LHNAM,LHRLS,LHRLC from x$kcclh;
LHSEQ LHNAM LHRLS LHRLC
---------- ----------------------------------- --------------- ----------------------------------------
1 /u01/archive/1_1_805858745.dbf 330515 01/28/2013 01:39:05
2 /u01/archive/1_2_805858745.dbf 330515 01/28/2013 01:39:05
3 /u01/archive/1_3_805858745.dbf 330515 01/28/2013 01:39:05
4 /u01/archive/1_4_805858745.dbf 330515 01/28/2013 01:39:05
5 /u01/archive/1_5_805858745.dbf 330515 01/28/2013 01:39:05
6 /u01/archive/1_6_805858745.dbf 330515 01/28/2013 01:39:05
7 /u01/archive/1_7_805858745.dbf 330515 01/28/2013 01:39:05
8 /u01/archive/1_8_805858745.dbf 330515 01/28/2013 01:39:05
9 /u01/archive/1_9_805858745.dbf 330515 01/28/2013 01:39:05
10 /u01/archive/1_10_805858745.dbf 330515 01/28/2013 01:39:05
11 /u01/archive/1_11_805858745.dbf 330515 01/28/2013 01:39:05
12 /u01/archive/1_12_805858745.dbf 330515 01/28/2013 01:39:05
13 /u01/archive/1_13_805858745.dbf 330515 01/28/2013 01:39:05
14 /u01/archive/1_14_805858745.dbf 330515 01/28/2013 01:39:05
15 /u01/archive/1_15_805858745.dbf 330515 01/28/2013 01:39:05
16 /u01/archive/1_16_805858745.dbf 330515 01/28/2013 01:39:05
17 /u01/archive/1_17_805858745.dbf 330515 01/28/2013 01:39:05
18 /u01/archive/1_18_805858745.dbf 330515 01/28/2013 01:39:05
19 /u01/archive/1_19_805858745.dbf 330515 01/28/2013 01:39:05
20 /u01/archive/1_20_805858745.dbf 330515 01/28/2013 01:39:05
21 /u01/archive/1_21_805858745.dbf 330515 01/28/2013 01:39:05
22 /u01/archive/1_22_805858745.dbf 330515 01/28/2013 01:39:05
23 /u01/archive/1_23_805858745.dbf 330515 01/28/2013 01:39:05
24 /u01/archive/1_24_805858745.dbf 330515 01/28/2013 01:39:05
25 /u01/archive/1_25_805858745.dbf 330515 01/28/2013 01:39:05
26 /u01/archive/1_26_805858745.dbf 330515 01/28/2013 01:39:05
27 /u01/archive/1_27_805858745.dbf 330515 01/28/2013 01:39:05
28 /u01/archive/1_28_805858745.dbf 330515 01/28/2013 01:39:05
29 /u01/archive/1_29_805858745.dbf 330515 01/28/2013 01:39:05
30 /u01/archive/1_30_805858745.dbf 330515 01/28/2013 01:39:05
31 /u01/archive/1_31_805858745.dbf 330515 01/28/2013 01:39:05
31 rows selected.
SQL>
SQL> select rtnum "thread#",decode(bitand(rtsta,128), 128, 'FB_ENABLED_FOR_THREAD','FB_DISABLED_FOR_THREAD') "FLASHBACK" from x$kccrt;
thread# FLASHBACK
---------- --------------------------------------------
1 FB_DISABLED_FOR_THREAD
SQL> col RTCKP_SCN for a15
SQL> col RTENB for a15
SQL> l
1* select RTCKP_SCN,RTCKP_RBA_SEQ,RTCKP_RBA_BNO,RTCKP_RBA_BOF,RTSEQ,RTENB from x$kccrt
SQL> /
RTCKP_SCN RTCKP_RBA_SEQ RTCKP_RBA_BNO RTCKP_RBA_BOF RTSEQ RTENB
--------------- ------------- ------------- ------------- ---------- ---------------
522089 32 2 16 32 330515
SQL>
SQL> col name for a55
SQL> select name, checkpoint_change#,to_char(checkpoint_change#,'XXXXXXXXXXXX') from v$datafile where name like '%roger%';
NAME CHECKPOINT_CHANGE# TO_CHAR(CHECKPOINT_CHANGE#
------------------------------------------------------- ------------------ --------------------------
/test/clonedb/roger01.dbf 522089 7F769
SQL> select checkpoint_change# from v$database;
CHECKPOINT_CHANGE#
------------------
522089
SQL>
SQL> select RESETLOGS_CHANGE#, PRIOR_RESETLOGS_CHANGE# ,CHECKPOINT_CHANGE# , CONTROLFILE_SEQUENCE#
2 ,CONTROLFILE_CHANGE#, MIN_REQUIRED_CAPTURE_CHANGE# from v$database;
RESETLOGS_CHANGE# PRIOR_RESETLOGS_CHANGE# CHECKPOINT_CHANGE#
----------------- ----------------------- ------------------
CONTROLFILE_SEQUENCE# CONTROLFILE_CHANGE# MIN_REQUIRED_CAPTURE_CHANGE#
--------------------- ------------------- ----------------------------
330515 1 522089
821 522089
SQL>
[oracle@lunar clonedb]$ cp roger01.dbf.bak roger01.dbf
[oracle@lunar clonedb]$
[oracle@lunar ~]$ ss
SQL*Plus: Release 11.2.0.3.0 Production on Mon Feb 4 16:44:05 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> recover datafile 5;
ORA-00279: change 521392 generated at 08/16/2012 03:07:34 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_27_805858745.dbf
ORA-00280: change 521392 for thread 1 is in sequence #27
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 521876 generated at 08/16/2012 03:21:17 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_28_805858745.dbf
ORA-00280: change 521876 for thread 1 is in sequence #28
ORA-00279: change 521884 generated at 08/16/2012 03:21:35 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_29_805858745.dbf
ORA-00280: change 521884 for thread 1 is in sequence #29
Log applied.
Media recovery complete.
SQL>
[oracle@lunar ~]$ ss
SQL*Plus: Release 11.2.0.3.0 Production on Mon Feb 4 16:44:05 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> recover datafile 5;
ORA-00279: change 521392 generated at 08/16/2012 03:07:34 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_27_805858745.dbf
ORA-00280: change 521392 for thread 1 is in sequence #27
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 521876 generated at 08/16/2012 03:21:17 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_28_805858745.dbf
ORA-00280: change 521876 for thread 1 is in sequence #28
ORA-00279: change 521884 generated at 08/16/2012 03:21:35 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_29_805858745.dbf
ORA-00280: change 521884 for thread 1 is in sequence #29
Log applied.
Media recovery complete.
SQL>
[oracle@lunar ~]$ rm /u01/archive/1_28_805858745.dbf
[oracle@lunar ~]$ cp /test/clonedb/roger01.dbf.bak /test/clonedb/roger01.dbf
[oracle@lunar ~]$
SQL> recover datafile 5;
ORA-00279: change 521392 generated at 08/16/2012 03:07:34 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_27_805858745.dbf
ORA-00280: change 521392 for thread 1 is in sequence #27
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 521876 generated at 08/16/2012 03:21:17 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_28_805858745.dbf
ORA-00280: change 521876 for thread 1 is in sequence #28
ORA-00308: cannot open archived log '/u01/archive/1_28_805858745.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SQL>
kscnbas/kcvcptim/kcvfhcpc/kcvfhccc
一般数据库启动会校验如下4个地方来验证数据库一致性:
1.kscnbas 数据文件最后一次检查点的SCN
2.kcvcptim 数据文件最后一次检查点的时间
3.kcvfhcpc ,检查点计数
4.kcvfhccc ,总是比检查点计数小1
BBED> p kcvfhckp
struct kcvfhckp, 36 bytes @484
struct kcvcpscn, 8 bytes @484
ub4 kscnbas @484 0x0007f694 521876
ub2 kscnwrp @488 0x0000
ub4 kcvcptim @492 0x2f2c5b2d
ub2 kcvcpthr @496 0x0001
union u, 12 bytes @500
struct kcvcprba, 12 bytes @500
ub4 kcrbaseq @500 0x0000001c
ub4 kcrbabno @504 0x00000002
ub2 kcrbabof @508 0x0000
ub1 kcvcpetb[0] @512 0x02
ub1 kcvcpetb[1] @513 0x00
ub1 kcvcpetb[2] @514 0x00
ub1 kcvcpetb[3] @515 0x00
ub1 kcvcpetb[4] @516 0x00
ub1 kcvcpetb[5] @517 0x00
ub1 kcvcpetb[6] @518 0x00
ub1 kcvcpetb[7] @519 0x00
BBED>
BBED> p kcvfhcpc
ub4 kcvfhcpc @140 0x00000013 19 v$datafile_header.checkpoint_count
BBED> p kcvfhccc
ub4 kcvfhccc @148 0x00000012 18
BBED>
set linesize 112
set pages 999
col LHNAM for a35
col LHRLS for a15
col LHRLC for a20
select LHSEQ,LHNAM,LHRLS,LHRLC from x$kcclh;
SQL> select LHSEQ,LHNAM,LHRLS,LHRLC from x$kcclh;
LHSEQ LHNAM LHRLS LHRLC
---------- ----------------------------------- --------------- --------------------
1 /u01/archive/1_1_805858745.dbf 330515 01/28/2013 01:39:05
2 /u01/archive/1_2_805858745.dbf 330515 01/28/2013 01:39:05
3 /u01/archive/1_3_805858745.dbf 330515 01/28/2013 01:39:05
4 /u01/archive/1_4_805858745.dbf 330515 01/28/2013 01:39:05
5 /u01/archive/1_5_805858745.dbf 330515 01/28/2013 01:39:05
6 /u01/archive/1_6_805858745.dbf 330515 01/28/2013 01:39:05
7 /u01/archive/1_7_805858745.dbf 330515 01/28/2013 01:39:05
8 /u01/archive/1_8_805858745.dbf 330515 01/28/2013 01:39:05
9 /u01/archive/1_9_805858745.dbf 330515 01/28/2013 01:39:05
10 /u01/archive/1_10_805858745.dbf 330515 01/28/2013 01:39:05
11 /u01/archive/1_11_805858745.dbf 330515 01/28/2013 01:39:05
12 /u01/archive/1_12_805858745.dbf 330515 01/28/2013 01:39:05
13 /u01/archive/1_13_805858745.dbf 330515 01/28/2013 01:39:05
14 /u01/archive/1_14_805858745.dbf 330515 01/28/2013 01:39:05
15 /u01/archive/1_15_805858745.dbf 330515 01/28/2013 01:39:05
16 /u01/archive/1_16_805858745.dbf 330515 01/28/2013 01:39:05
17 /u01/archive/1_17_805858745.dbf 330515 01/28/2013 01:39:05
18 /u01/archive/1_18_805858745.dbf 330515 01/28/2013 01:39:05
19 /u01/archive/1_19_805858745.dbf 330515 01/28/2013 01:39:05
20 /u01/archive/1_20_805858745.dbf 330515 01/28/2013 01:39:05
21 /u01/archive/1_21_805858745.dbf 330515 01/28/2013 01:39:05
22 /u01/archive/1_22_805858745.dbf 330515 01/28/2013 01:39:05
23 /u01/archive/1_23_805858745.dbf 330515 01/28/2013 01:39:05
24 /u01/archive/1_24_805858745.dbf 330515 01/28/2013 01:39:05
25 /u01/archive/1_25_805858745.dbf 330515 01/28/2013 01:39:05
26 /u01/archive/1_26_805858745.dbf 330515 01/28/2013 01:39:05
27 /u01/archive/1_27_805858745.dbf 330515 01/28/2013 01:39:05
28 /u01/archive/1_28_805858745.dbf 330515 01/28/2013 01:39:05
29 /u01/archive/1_29_805858745.dbf 330515 01/28/2013 01:39:05
30 /u01/archive/1_30_805858745.dbf 330515 01/28/2013 01:39:05
31 /u01/archive/1_31_805858745.dbf 330515 01/28/2013 01:39:05
31 rows selected.
SQL>
SQL> col rtckp for a10
SQL> col rtenb for a10
SQL> l
1* select RTCKP_SCN,RTCKP_RBA_SEQ,RTCKP_RBA_BNO,RTCKP_RBA_BOF,RTSEQ,RTENB from x$kccrt
SQL> /
RTCKP_SCN RTCKP_RBA_SEQ RTCKP_RBA_BNO RTCKP_RBA_BOF RTSEQ RTENB
-------------------------------- ------------- ------------- ------------- ---------- ----------
522089 32 2 16 32 330515
SQL>
SQL> select SEQUENCE#, RESETLOGS_CHANGE# , FIRST_CHANGE# ,NEXT_CHANGE#,NEXT_CHANGE# from v$archived_log;
SEQUENCE# RESETLOGS_CHANGE# FIRST_CHANGE# NEXT_CHANGE# NEXT_CHANGE#
---------- ----------------- ------------- ------------ ------------
1 330515 330515 337841 337841
2 330515 337841 341520 341520
3 330515 341520 346876 346876
4 330515 346876 368713 368713
5 330515 368713 374648 374648
6 330515 374648 381043 381043
7 330515 381043 387102 387102
8 330515 387102 389802 389802
9 330515 389802 394303 394303
10 330515 394303 400362 400362
11 330515 400362 405241 405241
12 330515 405241 411904 411904
13 330515 411904 418076 418076
14 330515 418076 422666 422666
15 330515 422666 445513 445513
16 330515 445513 474666 474666
17 330515 474666 495145 495145
18 330515 495145 517364 517364
19 330515 517364 520726 520726
20 330515 520726 520773 520773
21 330515 520773 520780 520780
22 330515 520780 520783 520783
23 330515 520783 520875 520875
24 330515 520875 521331 521331
25 330515 521331 521334 521334
26 330515 521334 521337 521337
27 330515 521337 521876 521876
28 330515 521876 521884 521884
29 330515 521884 521887 521887
30 330515 521887 522050 522050
31 330515 522050 522089 522089
31 rows selected.
SQL>
select SEQUENCE#, RESETLOGS_CHANGE# , FIRST_CHANGE# ,NEXT_CHANGE#,NEXT_CHANGE#
from v$archived_log
where sequence#>=28
;
SQL> select SEQUENCE#, RESETLOGS_CHANGE# , FIRST_CHANGE# ,NEXT_CHANGE#,NEXT_CHANGE#
2 from v$archived_log
3 where sequence#>=28
4 ;
SEQUENCE# RESETLOGS_CHANGE# FIRST_CHANGE# NEXT_CHANGE# NEXT_CHANGE#
---------- ----------------- ------------- ------------ ------------
28 330515 521876 521884 521884
29 330515 521884 521887 521887
30 330515 521887 522050 522050
31 330515 522050 522089 522089
SQL>
BBED> p kcvfhckp
struct kcvfhckp, 36 bytes @484
struct kcvcpscn, 8 bytes @484
ub4 kscnbas @484 0x0007f694 521876 改为 521884=0007F69C 9CF60700
ub2 kscnwrp @488 0x0000
ub4 kcvcptim @492 0x2f2c5b2d
ub2 kcvcpthr @496 0x0001
union u, 12 bytes @500
struct kcvcprba, 12 bytes @500
ub4 kcrbaseq @500 0x0000001c 28 改为29=1D
ub4 kcrbabno @504 0x00000002 2
ub2 kcrbabof @508 0x0000
ub1 kcvcpetb[0] @512 0x02
ub1 kcvcpetb[1] @513 0x00
ub1 kcvcpetb[2] @514 0x00
ub1 kcvcpetb[3] @515 0x00
ub1 kcvcpetb[4] @516 0x00
ub1 kcvcpetb[5] @517 0x00
ub1 kcvcpetb[6] @518 0x00
ub1 kcvcpetb[7] @519 0x00
BBED>
BBED> p kcvfhcpc
ub4 kcvfhcpc @140 0x00000013 19 v$datafile_header.checkpoint_count
BBED> p kcvfhccc
ub4 kcvfhccc @148 0x00000012 18
BBED>
BBED> m /x 9CF60700 OFFSET 484
BBED-00209: invalid number (9CF60700)
BBED> m /x 9cf6 offset 484
File: /test/clonedb/roger01.dbf (5)
Block: 1 Offsets: 484 to 995 Dba:0x01400001
------------------------------------------------------------------------
9cf60700 00000000 2d5b2c2f 01000000 1c000000 02000000 0000097f 02000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
0d000d00 0d000100 00000000 00000000 00000000 02004001 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
<32 bytes per line>
BBED> m /x 0700 offset 486
File: /test/clonedb/roger01.dbf (5)
Block: 1 Offsets: 486 to 997 Dba:0x01400001
------------------------------------------------------------------------
07000000 00002d5b 2c2f0100 00001c00 00000200 00000000 097f0200 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000d00
0d000d00 01000000 00000000 00000000 00000200 40010000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
<32 bytes per line>
BBED> p kcvfhckp
struct kcvfhckp, 36 bytes @484
struct kcvcpscn, 8 bytes @484
ub4 kscnbas @484 0x0007f69c
ub2 kscnwrp @488 0x0000
ub4 kcvcptim @492 0x2f2c5b2d
ub2 kcvcpthr @496 0x0001
union u, 12 bytes @500
struct kcvcprba, 12 bytes @500
ub4 kcrbaseq @500 0x0000001c
ub4 kcrbabno @504 0x00000002
ub2 kcrbabof @508 0x0000
ub1 kcvcpetb[0] @512 0x02
ub1 kcvcpetb[1] @513 0x00
ub1 kcvcpetb[2] @514 0x00
ub1 kcvcpetb[3] @515 0x00
ub1 kcvcpetb[4] @516 0x00
ub1 kcvcpetb[5] @517 0x00
ub1 kcvcpetb[6] @518 0x00
ub1 kcvcpetb[7] @519 0x00
BBED> sum apply
Check value for File 5, Block 1:
current = 0x6498, required = 0x6498
BBED>
BBED> set count 16
COUNT 16
BBED> d
File: /test/clonedb/roger01.dbf (5)
Block: 1 Offsets: 500 to 515 Dba:0x01400001
------------------------------------------------------------------------
1c000000 02000000 0000097f 02000000
<32 bytes per line>
BBED> m /x 1d
File: /test/clonedb/roger01.dbf (5)
Block: 1 Offsets: 500 to 515 Dba:0x01400001
------------------------------------------------------------------------
1d000000 02000000 0000097f 02000000
<32 bytes per line>
BBED> d
File: /test/clonedb/roger01.dbf (5)
Block: 1 Offsets: 500 to 515 Dba:0x01400001
------------------------------------------------------------------------
1d000000 02000000 0000097f 02000000
<32 bytes per line>
BBED> sum apply
Check value for File 5, Block 1:
current = 0x6499, required = 0x6499
BBED>
BBED> verify
DBVERIFY - Verification starting
FILE = /test/clonedb/roger01.dbf
BLOCK = 1
DBVERIFY - Verification complete
Total Blocks Examined : 1
Total Blocks Processed (Data) : 0
Total Blocks Failing (Data) : 0
Total Blocks Processed (Index): 0
Total Blocks Failing (Index): 0
Total Blocks Empty : 0
Total Blocks Marked Corrupt : 0
Total Blocks Influx : 0
Message 531 not found; product=RDBMS; facility=BBED
BBED>
SQL> recover datafile 5;
ORA-00279: change 521884 generated at 08/16/2012 03:21:17 needed for thread 1
ORA-00289: suggestion : /u01/archive/1_29_805858745.dbf
ORA-00280: change 521884 for thread 1 is in sequence #29
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
Log applied.
Media recovery complete.
SQL> alter database datafile 5 online;
Database altered.
SQL> alter database open;
Database altered.