Oracle异常恢复BBED系列

0    527    1

Tags:

👉 本文共约65008个字,系统预计阅读时间或需245分钟。

使用BBED修复sys.bootstrap$ 对象

前言部分

导读和注意事项

各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~:

① sys.bootstrap$的知识

② sys.bootstrap$块损坏的修复过程

③ BBED copy命令的使用

本文简介

本文的实验过程主要是为了学习BBED。

相关知识点扫盲(摘自网络)

Oracle异常恢复BBED系列

Oracle异常恢复BBED系列

11g下变成了521、522、523 这3个块。

Oracle异常恢复BBED系列

实验环境介绍

项目db
db 类型单实例
db version11.2.0.4.0
db 存储FS
主机IP地址/hosts配置192.168.59.129
OS版本及kernel版本AIX 7.1 64位
归档模式Archive Mode
ORACLE_SIDoralhr

实验目标

破坏sys.bootstrap$对象占用的4个块,然后利用BBED的copy从其他相同版本的文件中copy这4个块来恢复该对象。

实验过程

冷备system文件

ZFXDESKDB2:oracle:/oracle>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 14 16:10:07 2016

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

and Real Application Testing options

SYS@oralhr> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SYS@oralhr> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

and Real Application Testing options

ZFXDESKDB2:oracle:/oracle>cp /oracle/app/oracle/datafile/oralhr/system01.dbf /oracle/app/oracle/datafile/oralhr/system01.dbf_bk

ZFXDESKDB2:oracle:/oracle>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 14 16:34:04 2016

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

Connected to an idle instance.

SYS@oralhr> startup

ORACLE instance started.

Total System Global Area 3089920000 bytes

Fixed Size 2250360 bytes

Variable Size 721422728 bytes

Database Buffers 2348810240 bytes

Redo Buffers 17436672 bytes

Database mounted.

Database opened.

SYS@oralhr> SELECT dbms_rowid.rowid_relative_fno(rowid) rel_fno,

2 dbms_rowid.rowid_block_number(rowid) blockno,

3 count(1)

4 FROM sys.bootstrap$ d

5 group by dbms_rowid.rowid_relative_fno(rowid) ,

6 dbms_rowid.rowid_block_number(rowid) ;

REL_FNO BLOCKNO COUNT(1)

---------- ---------- ----------

1 523 12

1 521 26

1 522 22

====》 11g块号有所变化

SYS@oralhr>

SYS@oralhr> set line 9999 pagesize 9999

SYS@oralhr> col name format a80

SYS@oralhr> select file#||' '||name||' '||bytes name from v$datafile;

NAME

--------------------------------------------------------------------------------

1 /oracle/app/oracle/datafile/oralhr/system01.dbf 786432000

2 /oracle/app/oracle/datafile/oralhr/sysaux01.dbf 576716800

3 /oracle/app/oracle/datafile/oralhr/undotbs01.dbf 78643200

4 /oracle/app/oracle/datafile/oralhr/users01.dbf 310640640

SYS@oralhr>

模拟故障

total 208

-rwxrwxrwx 1 oracle dba 57 Apr 05 17:01 bbed.par

本人提供Oracle(OCP、OCM)、MySQL(OCP)、PostgreSQL(PGCA、PGCE、PGCM)等数据库的培训和考证业务,私聊QQ646634621或微信db_bao,谢谢!
Oracle异常恢复BBED系列后续精彩内容已被小麦苗无情隐藏,请输入验证码解锁本站所有文章!
验证码:
请先关注本站微信公众号,然后回复“验证码”,获取验证码。在微信里搜索“DB宝”或者“www_xmmup_com”或者微信扫描右侧二维码都可以关注本站微信公众号。

标签:

Avatar photo

小麦苗

学习或考证,均可联系麦老师,请加微信db_bao或QQ646634621

您可能还喜欢...

发表回复

嘿,我是小麦,需要帮助随时找我哦。
  • 18509239930
  • 个人微信

  • DB宝
  • 个人邮箱
  • 点击加入QQ群
  • 个人微店

  • 回到顶部