修改Datafile Header规避ORA-01190
一触发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 --------------

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]
