Welcome 微信登录

首页 / 数据库 / MySQL / 数据文件 failed check 的处理 - “ORA-01122database file 201 failed”

今天data从mounted 到open 的时候,报:
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01092: Oracle instance terminated. Disconnection forced检查alert日志:Errors in file /u01/pp/oracle/admin/ezhou/bdump/ezhou_dbw0_6672.trc:
ORA-01186: file 201 failed verification tests
ORA-01122: database file 201 failed verification check
ORA-01110: data file 201: "/u02/ezhou/temp01.dbf"
ORA-01203: wrong incarnation of this file - wrong creation SCN
Fri Dec  9 11:14:17 2011
File 201 not verified due to error ORA-01122报我的test01.dbf 有问题。
我看一下:
SQL> select * from v$tempfile;     FILE# CREATION_CHANGE# CREATION_TIME              TS#     RFILE# STATUS
---------- ---------------- ------------------- ---------- ---------- -------
ENABLED         BYTES     BLOCKS CREATE_BYTES BLOCK_SIZE
---------- ---------- ---------- ------------ ----------
NAME
--------------------------------------------------------------------------------
         1           446161 2011-08-27 21:25:00          3          1 ONLINE
READ WRITE   52428800       6400     20971520       8192
/u02/ezhou/temp01.dbf是online 的。思路:先offline 再online:
发现: offline 容易,online 难:SQL> alter database tempfile "/u02/ezhou/temp01.dbf" offline;Database altered.SQL> alter database tempfile "/u02/ezhou/temp01.dbf" online;
alter database tempfile "/u02/ezhou/temp01.dbf" online
*
ERROR at line 1:
ORA-01122: database file 201 failed verification check
ORA-01110: data file 201: "/u02/ezhou/temp01.dbf"
ORA-01203: wrong incarnation of this file - wrong creation SCN
好,下面试试删除重建:SQL> alter database tempfile "/u02/ezhou/temp01.dbf" drop;Database altered.SQL> alter tablespace temp add tempfile "/u02/ezhou/temp01.dbf" size 100m;
alter tablespace temp add tempfile "/u02/ezhou/temp01.dbf" size 100m
*
ERROR at line 1:
ORA-01109: database not open没有办法。
在看一下log:
ORA-01122: database file 201 failed verification check还是做一下datafile 的check 吧:SQL> alter system check datafiles;System altered.SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
SQL> alter database open;Database altered.SQL> select * from v$tempfile;no rows selected把原来的存在的文件:temp01.dbf 删除,重建:SQL> alter tablespace temp add tempfile "/u02/ezhou/temp01.dbf" size 100m;Tablespace altered.好,现在database open, temp文件也有了。Oracle 配置 catalog 成功恢复control filecatalog 配置 成功笔记相关资讯      Oracle基础教程 
  • Oracle块编程返回结果集详解  (11/10/2013 10:45:58)
  • Oracle基础教程之设置系统全局区  (08/22/2013 14:24:00)
  • Oracle基础教程知识点总结  (06/18/2013 07:43:32)
  • Oracle基础教程之tkprof程序详解  (10/22/2013 11:49:50)
  • Oracle基础教程之sqlplus汉字乱码  (07/18/2013 16:30:00)
  • Oracle 管理之 Linux 网络基础  (02/16/2013 18:37:35)
本文评论 查看全部评论 (0)
表情: 姓名: 字数