您好,登錄后才能下訂單哦!
這篇文章將為大家詳細講解有關kingsql中如何使用BBED修改Oracle數據文件頭推進SCN,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。
請看報大錯:
SQL> startup;
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size 2228784 bytes
Variable Size 989859280 bytes
Database Buffers 603979776 bytes
Redo Buffers 7344128 bytes
Database mounted.
ORA-01113: file 1 needs media recovery
ORA-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 recovery
ORA-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 2147548266
7 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 484
File: /u01/app/oracle/oradata/oggdb2/system01.dbf (1)
Block: 1 Offsets: 484 to 983 Dba:0x00400001
------------------------------------------------------------------------
8e4a0180 00000000 243e333b 01000000 94000000 02000000 10000000 02000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
0d000d00 0d000100 00000000 00000000 00000000 02004000 32270f00 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 02ace702 c1770dd9 007b503c cfdee590 34000000
00000000 00000000 00000000 00012997 2a000000 38020000 00000000 c08c5ef2
05fe25a5 9d6b999e 14265f03 1ef30600 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
BBED> m /x 654f0180 offset 484
File: /u01/app/oracle/oradata/oggdb2/system01.dbf (1)
Block: 1 Offsets: 484 to 983 Dba:0x00400001
------------------------------------------------------------------------
654f0180 00000000 243e333b 01000000 94000000 02000000 10000000 02000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
0d000d00 0d000100 00000000 00000000 00000000 02004000 32270f00 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 02ace702 c1770dd9 007b503c cfdee590 34000000
00000000 00000000 00000000 00012997 2a000000 38020000 00000000 c08c5ef2
05fe25a5 9d6b999e 14265f03 1ef30600 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
2.查看并修正數據文件頭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 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 0d000d00 0d000100
00000000 00000000 00000000 02004000 32270f00 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 02ace702 c1770dd9 007b503c cfdee590 34000000 00000000 00000000
00000000 00012997 2a000000 38020000 00000000 c08c5ef2 05fe25a5 9d6b999e
14265f03 1ef30600 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
BBED> m /x be42333b offset 492
File: /u01/app/oracle/oradata/oggdb2/system01.dbf (1)
Block: 1 Offsets: 492 to 991 Dba:0x00400001
------------------------------------------------------------------------
be42333b 01000000 94000000 02000000 10000000 02000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 0d000d00 0d000100
00000000 00000000 00000000 02004000 32270f00 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 02ace702 c1770dd9 007b503c cfdee590 34000000 00000000 00000000
00000000 00012997 2a000000 38020000 00000000 c08c5ef2 05fe25a5 9d6b999e
14265f03 1ef30600 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3.修改舊數據文件頭中檢查點計數器(kcvfhcpc)
BBED> dump offset 140
File: /u01/app/oracle/oradata/oggdb2/system01.dbf (1)
Block: 1 Offsets: 140 to 639 Dba:0x00400001
------------------------------------------------------------------------
28010000 223e333b 27010000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 06005359 5354454d 00000000 00000000 00000000 00000000 00000000
00000000 01000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 0a000a00 5c776c2d 01000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 654f0180 00000000
be42333b 01000000 94000000 02000000 10000000 02000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
BBED> m /x 2a010000 offset 140
File: /u01/app/oracle/oradata/oggdb2/system01.dbf (1)
Block: 1 Offsets: 140 to 639 Dba:0x00400001
------------------------------------------------------------------------
2a010000 223e333b 27010000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 06005359 5354454d 00000000 00000000 00000000 00000000 00000000
00000000 01000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 0a000a00 5c776c2d 01000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 654f0180 00000000
be42333b 01000000 94000000 02000000 10000000 02000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
4.修改舊數據文件頭中控制文件備份的計數器(kcvfhccc)的值
BBED> dump offset 148
File: /u01/app/oracle/oradata/oggdb2/system01.dbf (1)
Block: 1 Offsets: 148 to 647 Dba:0x00400001
------------------------------------------------------------------------
5c537c9d 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 06005359
5354454d 00000000 00000000 00000000 00000000 00000000 00000000 01000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 0a000a00 5c776c2d 01000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 654f0180 00000000 be42333b 01000000
94000000 02000000 10000000 02000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
BBED> m /x 29010000 offset 148
File: /u01/app/oracle/oradata/oggdb2/system01.dbf (1)
Block: 1 Offsets: 148 to 647 Dba:0x00400001
------------------------------------------------------------------------
29010000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 06005359
5354454d 00000000 00000000 00000000 00000000 00000000 00000000 01000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 0a000a00 5c776c2d 01000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 654f0180 00000000 be42333b 01000000
94000000 02000000 10000000 02000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5.重新生成sum
BBED> sum apply
Check value for File 1, Block 1:
current = 0xec9b, required = 0xec9b
6.查詢各個數據文件頭scn
SQL> 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.dbf
7 rows selected.
7 rows selected.
SQL> alter database open;
Database altered.
至此數據庫成功啟動咯~
關于“kingsql中如何使用BBED修改Oracle數據文件頭推進SCN”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。