重庆思庄Oracle、Redhat认证学习论坛
标题:
使用BBED解决数据文件头中记录的检查点比控制文件中记录的要新?
[打印本页]
作者:
郑全
时间:
2021-10-26 18:00
标题:
使用BBED解决数据文件头中记录的检查点比控制文件中记录的要新?
10G 关闭数据库,报错了:
SQL> shutdown immediate
ORA-01122: database file 5 failed verification check
ORA-01110: data file 5: '/u01/app/oracle/oradata/orcl/example01.dbf'
ORA-01207: file is more recent than control file - old control file
1.查看控制文件中关于bbed数据文件的信息
SQL> alter session set events 'immediate trace namecontrolf level 8';
查看生成的日志文件中
data file #5
的信息
DATA FILE #5:
(name #9) /u01/app/oracle/oradata/orcl/example01.dbf
creation size=12800 block size=8192 status=0xe head=9 tail=9 dup=1
tablespace 6, index=6 krfil=5 prev_file=0
unrecoverable scn: 0x0000.00000000 01/01/1988 00:00:00
Checkpoint cnt:
17
scn: 0x0000.000728c0 10/26/2021 16:29:43
Stop scn: 0xffff.ffffffff 02/21/2021 12:02:41
Creation Checkpointed at scn: 0x0000.00063947 02/20/2021 19:24:48
thread:1 rba:(0x1.6507.10)
可以看出控制文件中记录的检查点计数器的值为17转换成16进制为11,数据文件头中控制文件备份的计数器等于17-1=16换成16进制为10
。
2
、修改EXAMPLE数据文件头中检查点计数器(
kcvfhcpc
)为控制文件记录的值
BBED> m /x
11000000
offset 140
Warning: contents of previous BIFILE will be lost. Proceed? (Y/N)
y
File: /u01/app/oracle/oradata/orcl/example01.dbf (5)
Block: 1 Offsets: 140 to 651 Dba:0x01400001
------------------------------------------------------------------------
11000000 1b087c3f 39000000 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
06000000 07004558 414d504c 45000000 00000000 00000000 00000000 00000000
00000000 05000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 3892b92a 01000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 c0280700 00000000
f7ddc940 01000000 05000000 8e120000 10000000 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
<32 bytes per line>
2
、修改example数据文件头中控制文件备份的计数器(
kcvfhccc
)的值
BBED> m /x
10000000
offset 148
File: /u01/app/oracle/oradata/orcl/example01.dbf (5)
Block: 1 Offsets: 148 to 659 Dba:0x01400001
------------------------------------------------------------------------
10000000 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 06000000 07004558
414d504c 45000000 00000000 00000000 00000000 00000000 00000000 05000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 3892b92a 01000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 c0280700 00000000 f7ddc940 01000000
05000000 8e120000 10000000 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
<32 bytes per line>
3.
重新生成sum
BBED> sum apply
Check value for File 5, Block 1:
current = 0x3b90, required = 0x3b90
之后,再去关闭数据库,正常。
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/)
Powered by Discuz! X3.2