大橙子网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

kingsql中如何使用BBED修改Oracle数据文件头推进SCN

这篇文章将为大家详细讲解有关kingsql中如何使用BBED修改Oracle数据文件头推进SCN,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

创新互联建站成都企业网站建设服务,提供成都网站制作、做网站、外贸营销网站建设网站开发,网站定制,建网站,网站搭建,网站设计,成都响应式网站建设公司,网页设计师打造企业风格网站,提供周到的售前咨询和贴心的售后服务。欢迎咨询做网站需要多少钱:13518219792

请看报大错:

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”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。


本文标题:kingsql中如何使用BBED修改Oracle数据文件头推进SCN
本文URL:http://dzwzjz.com/article/gedhoj.html
在线咨询
服务热线
服务热线:028-86922220
TOP