签到成功

知道了

CNDBA社区CNDBA社区

Oracle 19c 使用 BBED 查看 datafile header 信息

2021-11-22 14:01 1755 0 原创 Oracle 19c
作者: dave

在上节我们看了19c BBED 安装:http://www.cndba.cn/dave/article/22204

Oracle 19c 安装 BBED
https://www.cndba.cn/dave/article/22203http://www.cndba.cn/dave/article/22204

http://www.cndba.cn/dave/article/22204
http://www.cndba.cn/dave/article/22204

在数据库环境中,当归档丢失时,可能会遇到ORA-01113 和 ORA-01110 的错误。 http://www.cndba.cn/dave/article/22204

http://www.cndba.cn/dave/article/22204

SQL> alter database datafile 7 online;
 alter database datafile 7 online
*
ERROR at line 1:
ORA-01113: file 7 needs media recovery
ORA-01110: data file 7: '/u01/app/oracle/oradata/dave/dave02.dbf'

此时可以用BBED 修改datafile header中的4个属性,只需要根据其他正常的数据文件进行修改即可。http://www.cndba.cn/dave/article/22204http://www.cndba.cn/dave/article/22204

在11g 中相关属性的偏移量如下:http://www.cndba.cn/dave/article/22204

(1)kscnbas (at offset 484) - SCN of last change to the datafile.
(2)kcvcptim (at offset 492) -Time of the last change to the datafile.
(3)kcvfhcpc (at offset 140) - Checkpoint count.
(4)kcvfhccc (at offset 148) - Unknown, but is always 1 less than thecheckpoint point count.

在Oracle 19c 中,这些偏移量并没有变化,验证如下:http://www.cndba.cn/dave/article/22204

[dave@www.cndba.cn  u01]$ bbed parfile=/u01/bbed.par
Password:

BBED: Release 2.0.0.0.0 - Limited Production on Mon Nov 22 13:54:00 2021

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

************* !!! For Oracle Internal Use only !!! ***************

BBED> set dba 17,1
        DBA             0x04400001 (71303169 17,1)

BBED> show
        FILE#           17
        BLOCK#          1
        OFFSET          0
        DBA             0x04400001 (71303169 17,1)
        FILENAME        /u01/app/oracle/oradata/CNDBA/dave/dave01.dbf
        BIFILE          bifile.bbd
        LISTFILE        /u01/filelists
        BLOCKSIZE       8192
        MODE            Edit
        EDIT            Unrecoverable
        IBASE           Dec
        OBASE           Dec
        WIDTH           80
        COUNT           512
        LOGFILE         log.bbd
        SPOOL           No

BBED> p kcvfhckp
struct kcvfhckp, 36 bytes                   @484
   struct kcvcpscn, 8 bytes                 @484
      ub4 kscnbas                           @484      0x006b29ec
      ub2 kscnwrp                           @488      0x8000
      ub2 kscnwrp2                          @490      0x0000
   ub4 kcvcptim                             @492      0x40a2a344
……
BBED> p kcvfhcpc
ub4 kcvfhcpc                                @140      0x00000039

BBED> p kcvfhccc
ub4 kcvfhccc                                @148      0x00000038

BBED>
BBED>  d /v dba 17,1 offset 484 count 16
 File: /u01/app/oracle/oradata/CNDBA/dave/dave01.dbf (17)
 Block: 1       Offsets:  484 to  499  Dba:0x04400001
-------------------------------------------------------
 ec296b00 00800000 44a3a240 0100ca12 l .)k.....D..@....

 <16 bytes per line>

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2261
    原创
  • 3
    翻译
  • 578
    转载
  • 191
    评论
  • 访问:7970569次
  • 积分:4346
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ