首頁 資料庫 mysql教程 修改Datafile Header规避ORA-01190

修改Datafile Header规避ORA-01190

Jun 07, 2016 pm 05:41 PM

一触发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

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

本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
2 週前 By 尊渡假赌尊渡假赌尊渡假赌
倉庫:如何復興隊友
4 週前 By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒險:如何獲得巨型種子
3 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

減少在Docker中使用MySQL內存的使用 減少在Docker中使用MySQL內存的使用 Mar 04, 2025 pm 03:52 PM

減少在Docker中使用MySQL內存的使用

如何使用Alter Table語句在MySQL中更改表? 如何使用Alter Table語句在MySQL中更改表? Mar 19, 2025 pm 03:51 PM

如何使用Alter Table語句在MySQL中更改表?

mysql無法打開共享庫怎麼解決 mysql無法打開共享庫怎麼解決 Mar 04, 2025 pm 04:01 PM

mysql無法打開共享庫怎麼解決

在 Linux 中運行 MySQl(有/沒有帶有 phpmyadmin 的 podman 容器) 在 Linux 中運行 MySQl(有/沒有帶有 phpmyadmin 的 podman 容器) Mar 04, 2025 pm 03:54 PM

在 Linux 中運行 MySQl(有/沒有帶有 phpmyadmin 的 podman 容器)

什麼是 SQLite?全面概述 什麼是 SQLite?全面概述 Mar 04, 2025 pm 03:55 PM

什麼是 SQLite?全面概述

在MacOS上運行多個MySQL版本:逐步指南 在MacOS上運行多個MySQL版本:逐步指南 Mar 04, 2025 pm 03:49 PM

在MacOS上運行多個MySQL版本:逐步指南

哪些流行的MySQL GUI工具(例如MySQL Workbench,PhpMyAdmin)是什麼? 哪些流行的MySQL GUI工具(例如MySQL Workbench,PhpMyAdmin)是什麼? Mar 21, 2025 pm 06:28 PM

哪些流行的MySQL GUI工具(例如MySQL Workbench,PhpMyAdmin)是什麼?

如何為MySQL連接配置SSL/TLS加密? 如何為MySQL連接配置SSL/TLS加密? Mar 18, 2025 pm 12:01 PM

如何為MySQL連接配置SSL/TLS加密?

See all articles