修改Datafile Header规避ORA-01190

php中文网
发布: 2016-06-07 17:41:26
原创
1044人浏览过

一触发ORA-01190错误的原因1先抛出一个ora-01190错误,此错误用bbed工具构造SQLstartupORACLEinstancestarted.TotalSystemGlobalArea322961408bytesFixedSize&nb

一 触发ora-01190错误的原因

 

1 先抛出一个ora-01190错误,此错误用bbed工具构造

SQL> startup

ORACLE instance started.

 

Total System Global Area 322961408 bytes

Fixed Size                  2020480 bytes

Variable Size              96471936 bytes

Database Buffers          218103808 bytes

Redo Buffers                6365184 bytes

Database mounted.

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

ORA-01110: data file 11: '/oracle/test/jiujian1.dbf'

 

2 oerr ora 01190 给出这个错误的解释

 

[oracle@oracle ~]$ oerr ora 01190

01190, 00000, "control file or data file %s is from before the last RESETLOGS"

// *Cause: Attempting to use a data file when the log reset information in

//          the file does not match the control file. Either the data file

//          or the control file is a backup that was made before the most

//          recent ALTER DATABASE OPEN RESETLOGS.

// *Action: Restore file from a more recent backup.

 以上英文大体意思是

  调用数据文件时发现数据文件的resetlogs信息和控制文件中resetlogs信息不匹配。

 

3 查询数据文件头部和控制文件中关于resetlogs的信息

控制文件中关于resetlogs的相关信息如下:

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

RESETLOGS_CHANGE#     TIME

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

   2781464667   01/15/2013 21:51:45

各数据文件头中resetlogs的信息如下:

Fhrls:resetlogs scn值

Fhrlc:resetlogs count值

fhrlc_i:resetlogs count 转换成10进制的值

对于resetlogs count 的描述如下:

reset logs count and scn: The counter with the SCN is called the Reset Log Stamp,

and is a unique identification. The counter is in fact a timestamp

 

 

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

 

   HXFIL  CHANGE#             FHRLC_I      TIME

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

    1      2781464667        804808305  01/15/2013 21:51:45

    2      2781464667        804808305  01/15/2013 21:51:45

    3      2781464667        804808305  01/15/2013 21:51:45

    4      2781464667        804808305  01/15/2013 21:51:45

    5      2781464667        804808305  01/15/2013 21:51:45

    6      2781464667        804808305  01/15/2013 21:51:45

    7      2781464667        804808305  01/15/2013 21:51:45

    8      2781464667        804808305  01/15/2013 21:51:45

    11     2781455194        804803925  01/15/2013 20:38:45

    12     2781464667        804808305  01/15/2013 21:51:45

    13     2781464667        804808305  01/15/2013 21:51:45

 

11 rows selected.

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

 

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

 

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

 

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

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

BBED> p offset 112

kcvfh.kcvfhrlc

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

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号