这篇文章将为大家详细讲解有关kingsql中如何使用BBED修改Oracle数据文件头推进SCN,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。请看报大错:SQL> startup;ORACLE instance started.Total System Global Area 1603411968 bytesFixed Size 2228784 bytesVariable Size 989859280 bytesDatabase Buffers 603979776 bytesRedo Buffers 7344128 bytesDatabase mounted.ORA-01113: file 1 needs media recoveryORA-01110: data file 1: ‘/u01/app/oracle/oradata/oggdb2/system01.dbf’SQL> alter database open;alter database open*ERROR at line 1:ORA-01113: file 1 needs media recoveryORA-01110: data file 1: ‘/u01/app/oracle/oradata/oggdb2/system01.dbf’现在开始修复数据吧!SQL> select name,checkpoint_change# from v$datafile;NAME CHECKPOINT_CHANGE#———————————————————— ——————/u01/app/oracle/oradata/oggdb2/system01.dbf 2147548266/u01/app/oracle/oradata/oggdb2/sysaux01.dbf 2147548266/u01/app/oracle/oradata/oggdb2/undotbs01.dbf 2147548266/u01/app/oracle/oradata/oggdb2/users01.dbf 2147548266/u01/app/oracle/oradata/oggdb2/example01.dbf 2147548266/u01/app/oracle/oradata/oggdb2/gguser.dbf 2147548266/u01/app/oracle/oradata/oggdb2/p2pdata01.dbf 21475482667 rows selected.SQL> select name,checkpoint_change# from v$datafile_header;NAME CHECKPOINT_CHANGE#———————————————————— ——————/u01/app/oracle/oradata/oggdb2/system01.dbf 2147546874/u01/app/oracle/oradata/oggdb2/sysaux01.dbf 2147548266/u01/app/oracle/oradata/oggdb2/undotbs01.dbf 2147548266/u01/app/oracle/oradata/oggdb2/users01.dbf 2147548266/u01/app/oracle/oradata/oggdb2/example01.dbf 2147548266/u01/app/oracle/oradata/oggdb2/gguser.dbf 2147548266/u01/app/oracle/oradata/oggdb2/p2pdata01.dbf 2147548266修复过程:
1.修改旧数据文件头scn的值BBED> dump offset 484File: /u01/app/oracle/oradata/oggdb2/system01.dbf (1)Block: 1 Offsets: 484 to 983 Dba:0x00400001————————————————————————8e4a0180 00000000 243e333b 01000000 94000000 02000000 10000000 0200000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 000000000d000d00 0d000100 00000000 00000000 00000000 02004000 32270f00 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 02ace702 c1770dd9 007b503c cfdee590 3400000000000000 00000000 00000000 00012997 2a000000 38020000 00000000 c08c5ef205fe25a5 9d6b999e 14265f03 1ef30600 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000BBED> m /x 654f0180 offset 484File: /u01/app/oracle/oradata/oggdb2/system01.dbf (1)Block: 1 Offsets: 484 to 983 Dba:0x00400001————————————————————————654f0180 00000000 243e333b 01000000 94000000 02000000 10000000 0200000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 000000000d000d00 0d000100 00000000 00000000 00000000 02004000 32270f00 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 02ace702 c1770dd9 007b503c cfdee590 3400000000000000 00000000 00000000 00012997 2a000000 38020000 00000000 c08c5ef205fe25a5 9d6b999e 14265f03 1ef30600 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 0000000免费主机域名0 00000000 00000000 000000002.查看并修正数据文件头chckpoint_time的值本文固定链接
http://blog.itpub.net/28389881/viewspace-2221607/BBED> dump offset 492
File: /u01/app/oracle/oradata/oggdb2/system01.dbf (1)Block: 1 Offsets: 492 to 991 Dba:0x00400001————————————————————————243e333b 01000000 94000000 02000000 10000000 02000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 0d000d00 0d00010000000000 00000000 00000000 02004000 32270f00 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 02ace702 c1770dd9 007b503c cfdee590 34000000 00000000 0000000000000000 00012997 2a000000 38020000 00000000 c08c5ef2 05fe25a5 9d6b999e14265f03 1ef30600 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000BBED> m /x be42333b offset 492File: /u01/app/oracle/oradata/oggdb2/system01.dbf (1)Block: 1 Offsets: 492 to 991 Dba:0x00400001————————————————————————be42333b 01000000 94000000 02000000 10000000 02000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 0d000d00 0d00010000000000 00000000 00000000 02004000 32270f0免费主机域名0 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 02ace702 c1770dd9 007b503c cfdee590 34000000 00000000 0000000000000000 00012997 2a000000 38020000 00000000 c08c5ef2 05fe25a5 9d6b999e14265f03 1ef30600 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 000000003.修改旧数据文件头中检查点计数器(kcvfhcpc)BBED> dump offset 140File: /u01/app/oracle/oradata/oggdb2/system01.dbf (1)Block: 1 Offsets: 140 to 639 Dba:0x00400001————————————————————————28010000 223e333b 27010000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 06005359 5354454d 00000000 00000000 00000000 00000000 0000000000000000 01000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 0a000a00 5c776c2d 01000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 654f0180 00000000be42333b 01000000 94000000 02000000 10000000 02000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000BBED> m /x 2a010000 offset 140File: /u01/app/oracle/oradata/oggdb2/system01.dbf (1)Block: 1 Offsets: 140 to 639 Dba:0x00400001————————————————————————2a010000 223e333b 27010000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 06005359 5354454d 00000000 00000000 00000000 00000000 0000000000000000 01000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 0a000a00 5c776c2d 01000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 654f0180 00000000be42333b 01000000 94000000 02000000 10000000 02000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 000000004.修改旧数据文件头中控制文件备份的计数器(kcvfhccc)的值BBED> dump offset 148File: /u01/app/oracle/oradata/oggdb2/system01.dbf (1)Block: 1 Offsets: 148 to 647 Dba:0x00400001————————————————————————5c537c9d 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 060053595354454d 00000000 00000000 00000000 00000000 00000000 00000000 0100000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 0a000a00 5c776c2d 01000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 654f0180 00000000 be42333b 0100000094000000 02000000 10000000 02000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000BBED> m /x 29010000 offset 148File: /u01/app/oracle/oradata/oggdb2/system01.dbf (1)Block: 1 Offsets: 148 to 647 Dba:0x00400001————————————————————————29010000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 060053595354454d 00000000 00000000 00000000 00000000 00000000 00000000 0100000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 0a000a00 5c776c2d 01000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 654f0180 00000000 be42333b 0100000094000000 02000000 10000000 02000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 00000000 00000000 000000005.重新生成sumBBED> sum applyCheck value for File 1, Block 1:current = 0xec9b, required = 0xec9b6.查询各个数据文件头scnSQL> select file#,checkpoint_change#,name from v$datafile_header; FILE# CHECKPOINT_CHANGE# NAME———- —————— ———————————————————— 1 2147548266 /u01/app/oracle/oradata/oggdb2/system01.dbf 2 2147548266 /u01/app/oracle/oradata/oggdb2/sysaux01.dbf 3 2147548266 /u01/app/oracle/oradata/oggdb2/undotbs01.dbf 4 2147548266 /u01/app/oracle/oradata/oggdb2/users01.dbf 5 2147548266 /u01/app/oracle/oradata/oggdb2/example01.dbf 6 2147548266 /u01/app/oracle/oradata/oggdb2/gguser.dbf 7 2147548266 /u01/app/oracle/oradata/oggdb2/p2pdata01.dbf7 rows selected.7 rows selected.SQL> alter database open;Database altered.至此数据库成功启动咯~关于“kingsql中如何使用BBED修改Oracle数据文件头推进SCN”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。
这篇文章给大家分享的是有关MySQL中MHA有什么用的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。 概述MHA是一位日本MySQL大牛用Perl写的一套MySQL故障切换方案,来保证数据库系统的高可用.在宕机的时间内(通常10—30…