设为首页 加入收藏

TOP

通过BBED修复ORA-01190错误(二)
2015-12-01 16:03:15 来源: 作者: 【 】 浏览:116
Tags:通过 BBED 修复 ORA-01190 错误
据库,则13号文件会丢失。所以我们用如下命令增加关键字for drop 意思就是告诉数据库,这个数据文件我后面可能会丢弃,不会在online了。


SQL> alter database datafile 13 offline for drop;


Database altered.


SQL> alter database open resetlogs;


Database altered.


SQL> select resetlogs_change#, to_char(resetlogs_time,'mm/dd/yyyy hh24:mi:ss') time from v$database;


RESETLOGS_CHANGE# TIME


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


? ? ? ? ? 1268631 10/01/2015 11:46:40


SQL> col fhrlc for a50


SQL> set linesize 400 ?


SQL> ?select hxfil,fhrls change#,fhrlc_i,fhrlc time from x$kcvfh;


? ? ?HXFIL CHANGE# ? ? ? ? ? ? ? ? ? ? ? ? ? ? FHRLC_I TIME


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


? ? ? ? ?1 1268631 ? ? ? ? ? ? ? ? ? ? ? ? ? 891949600 10/01/2015 11:46:40


? ? ? ? ?2 1268631 ? ? ? ? ? ? ? ? ? ? ? ? ? 891949600 10/01/2015 11:46:40


? ? ? ? ?3 1268631 ? ? ? ? ? ? ? ? ? ? ? ? ? 891949600 10/01/2015 11:46:40


? ? ? ? ?4 1268631 ? ? ? ? ? ? ? ? ? ? ? ? ? 891949600 10/01/2015 11:46:40


? ? ? ? ?5 1267919 ? ? ? ? ? ? ? ? ? ? ? ? ? 891948516 10/01/2015 11:28:36


? ? ? ? ?6 1268631 ? ? ? ? ? ? ? ? ? ? ? ? ? 891949600 10/01/2015 11:46:40


6 rows selected.


通过对比5号文件的resetlogs scn及resetlogs count值不难发现触发ora-01190的原因:即数据文件头部的 resetlogs scn 、resetlogs count 和控制文件中的resetlogs信息不匹配造成的。所以,如果要规避ora-01190错误,我们可以通过bbed修改数据文件头部resetlogs相关值


3、通过bbed修改数据文件头部规避此错误


1 ?resetlogs count 和resetlogs scn 在数据文件头部的位置


resetlogs count 位于数据文件头部偏移量112处


resetlogs scn 位于数据文件头部偏移量116处


SQL> alter database datafile 5 online;


alter database datafile 5 online


*


ERROR at line 1:


ORA-01190: control file or data file 5 is from before the last RESETLOGS


ORA-01110: data file 5: '/u01/app/oracle/oradata/satdb/data01.dbf'


[oracle@orcl ~]$ bbed parfile=parameter.txt ?password=blockedit


BBED: Release 2.0.0.0.0 - Limited Production on Thu Oct 1 11:52:29 2015


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


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


BBED> dump /v dba 1,1 offset 112 count 30


?File: /u01/app/oracle/oradata/satdb/system01.dbf (1)


?Block: 1 ? ? ? Offsets: ?112 to ?141 ?Dba:0x00400001


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


?20122a35 975b1300 00000000 00000000 l ?.*5.[..........


?00000000 00000000 00000420 cf00 ? ? l ........... ..


?<16 bytes per line>


BBED> dump /v dba 5,1 offfset 112 count 30


BBED-00202: invalid parameter (offfset)


BBED> dump /v dba 5,1 offset 112 count 30


?File: /u01/app/oracle/oradata/satdb/data01.dbf (5)


?Block: 1 ? ? ? Offsets: ?112 to ?141 ?Dba:0x01400001


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


?e40d2a35 cf581300 00000000 00000000 l ..*5.X..........


?00000000 00000000 00000400 7f00 ? ? l ..............


?<16 bytes per line>


BBED> modify /x 2012


Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) y


?File: /u01/app/oracle/oradata/satdb/data01.dbf (5)


?Block: 1 ? ? ? ? ? ? ? ?Offsets: ?112 to ?141 ? ? ? ? ? Dba:0x01400001


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


?20122a35 cf581300 00000000 00000000 00000000 00000000 00000400 7f00?


?<32 bytes per line>


BBED> dump /v dba 1,1 offset 116 count 30


?File: /u01/app/oracle/oradata/satdb/system01.dbf (1)


?Block: 1 ? ? ? Offsets: ?116 to ?145 ?Dba:0x00400001


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


?975b1300 00000000 00000000 00000000 l .[..............


?00000000 00000420 cf000000 8811 ? ? l ....... ......


?<16 bytes per line>


BBED> dump /v dba 5,1 offset 116 count 30


?File: /u01/app/oracle/oradata/satdb/data01.dbf (5)


?Block: 1 ? ? ? Offsets: ?116 to ?145 ?Dba:0x01400001

首页 上一页 1 2 3 4 5 下一页 尾页 2/5/5
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Oracle跟踪常用内部事件号 下一篇MongoDB2.6部署副本集+分区

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: