Oracle数据库宕机,启动数据库报错ORA01122 ORA01110 ORA01207问题处理方法

2024年 5月 20日 100.0k 0

一个测试库异常宕机,启动数据时,报错如下:

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01122: database file 5 failed verification check
ORA-01110: data file 5: '/u01/oradata/dbbbed/tbst01.dbf'
ORA-01207: file is more recent than control file - old control file

一、关于ORA-01207错误解释

$ oerr ora 01207
01207, 00000, "file is more recent than control file - old control file"
// *Cause: The control file change sequence number in the data file is
// greater than the number in the control file. This implies that
// the wrong control file is being used. Note that repeatedly causing
// this error can make it stop happening without correcting the real
// problem. Every attempt to open the database will advance the
// control file change sequence number until it is great enough.
// *Action: Use the current control file or do backup control file recovery to
// make the control file current. Be sure to follow all restrictions
// on doing a backup control file recovery.

从上面的解释看出,造成ora-01207错误的是由于数据文件头部记录控制seq号比控制文件中记录的值大。

二、问题排查

–查看数据文件头部记录的控制文件seq号
说明:数据文件头部记录的控制文件seq号位于 offset 40,如下:

BBED> set file 5 block 1
FILE# 5
BLOCK# 1

BBED> p kcvfh
....................................
ub4 kccfhcsq @40 0x00000f9b 转换为10进制为3995

–bbed查看文件头部信息和通过表x$kcvfh查询到的值一样(fhcsq为控制文件seq号)

SQL> select hxfil,fhcsq,fhscn,fhrba_seq,fhcpc from x$kcvfh;

HXFIL FHCSQ FHSCN FHRBA_SEQ FHCPC
---------- ---------- ---------------- ---------- ----------
1 3739 1978449 42 306
2 3739 1978449 42 308
3 3739 1978449 42 227
4 3739 1978449 42 305
5 3995 1978449 42 295

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论