Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3386124
  • 博文数量: 631
  • 博客积分: 10716
  • 博客等级: 上将
  • 技术积分: 8397
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-01 22:35
文章分类

全部博文(631)

文章存档

2020年(2)

2019年(22)

2018年(4)

2017年(37)

2016年(22)

2015年(1)

2013年(12)

2012年(20)

2011年(19)

2010年(20)

2009年(282)

2008年(190)

分类: Oracle

2019-02-08 11:45:11

BBED模拟并修复

删除:$ORACLE_HOME/rdbms/admin/prvtsupp.plb

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-00704: bootstrap process failure
ORA-00600: internal error code, arguments: [16703], [1403], [20], [], [], [], [], [], [], [], [], []
Process ID: 29344
Session ID: 3319 Serial number: 3

利用:第三方工具GDUL,导出mount下库的数据,导入到新的库。以解决这个灾难

https://www.cnblogs.com/lhrbest/p/7576416.html#3795408

部分处理过程:

oradebug:生成10046事件,观察报错信息:
alter session set tracefile_identifier='elon';
alter session set events '10046 trace name context forever,level 12';
alter session set events '10046 trace name context off';

 

查文件块号:
select
dbms_rowid.ROWID_RELATIVE_FNO(rowid) fno,
dbms_rowid.ROWID_BLOCK_NUMBER(rowid) bno,
dbms_rowid.ROWID_ROW_NUMBER(rowid) rowno from sys.tab$ ;

select max(dbms_rowid.ROWID_BLOCK_NUMBER(rowid)) bno from sys.tab$ ;
select min(dbms_rowid.ROWID_BLOCK_NUMBER(rowid)) bno from sys.tab$ ;

select distinct file_no, blk_no
from
(
select dbms_rowid.rowid_relative_fno(rowid) file_no, dbms_rowid.rowid_block_number(rowid) blk_no from sys.tab$
) order by file_no, blk_no;


生成copy 语句:
select 'copy file 100 block ' || blk_no || ' to file 1 block ' || blk_no || ';'
from
(
select distinct dbms_rowid.rowid_relative_fno(rowid) file_no, dbms_rowid.rowid_block_number(rowid) blk_no
from sys.tab$
order by file_no, blk_no
);

select distinct file_no, blk_no
from
(
select dbms_rowid.rowid_relative_fno(rowid) file_no, dbms_rowid.rowid_block_number(rowid) blk_no from sys.tab$
)
where blk_no = 31497;

file: 1, 块号是169,170,145


vi filelist.txt
1 /home/oracle/oradata/dstdw/system01.dbf
2 /home/oracle/oradata/dstdw/sysaux01.dbf
3 /home/oracle/oradata/dstdw/undotbs01.dbf
4 /home/oracle/oradata/dstdw/users01.dbf
5 /home/oracle/oradata/dstdw/credit.dbf
100 /tmp/system01.dbf.new

vi par.bbd
blocksize=8192
listfile=filelist.txt
mode=edit

从备份文件中copy良好的数据块进行恢复
[oracle@ ~]$ bbed parfile=par.bbd
password:blockedit

BBED>copy file 100 block 169 to file 1 block 169;
BBED>copy file 100 block 170 to file 1 block 170;
BBED>copy file 100 block 145 to file 1 block 145;

BBED> verify

 

阅读(1512) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~