[oracle@localhost orcl]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Nov 19 15:26:47 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 71305460 bytes
Database Buffers 92274688 bytes
Redo Buffers 2973696 bytes
Database mounted.
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/free/oracle/oradata/orcl/system01.dbf'
ORA-01207: file is more recent than control file - old control file
出现了ORA-01207错误:
SQL> shutdown abort
ORACLE instance shut down.
SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
首先删除old control file,其实也可以不删除,个人习惯,然后重建控制文件。
重建控制文件可以在数据库到mount状态下执行alter database backup controlfile to trace生成sql文件,具体操作很简单,不再描述。
[oracle@localhost orcl]$ rm -rf control0*
[oracle@localhost orcl]$ vi create.sql
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/free/oracle/oradata/orcl/redo01.log' SIZE 50M,
GROUP 2 '/free/oracle/oradata/orcl/redo02.log' SIZE 50M,
GROUP 3 '/free/oracle/oradata/orcl/redo03.log' SIZE 50M
-- STANDBY LOGFILE
DATAFILE
'/free/oracle/oradata/orcl/system01.dbf',
'/free/oracle/oradata/orcl/undotbs01.dbf',
'/free/oracle/oradata/orcl/sysaux01.dbf',
'/free/oracle/oradata/orcl/users01.dbf',
CHARACTER SET AL32UTF8
;
[oracle@localhost orcl]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Nov 19 15:28:00 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> @create
ORACLE instance started.
Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 71305460 bytes
Database Buffers 92274688 bytes
Redo Buffers 2973696 bytes
Control file created.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/free/oracle/oradata/orcl/system01.dbf'
不能直接open,看来有需要恢复的,执行recover database;
SQL> recover database;
Media recovery complete.
SQL> alter database open;
阅读(831) | 评论(0) | 转发(0) |