全部博文(12)
分类: Oracle
2008-08-27 17:50:11
故障现象:
ORA-01122: 文件 1 验证失败
ORA-01110: 数据文件 1:
'F:\ORACLE\PRODUCT\10.2.0\DB_1\ORADATA\ORCL\SYSTEM01.DBF'
ORA-01207: 文件比控制文件更新 - 旧的控制文件
解决办法:
1. SQL>alter database backup controlfile to trace as 'c:\RebuildCtl.sql';
数据库已更改。
2. SQL>shutdown immediate如果数据库是打开状态,则关闭
ORA-01109: 数据库未打开
已经卸载数据库
3. SQL>startup nomount;
ORACLE 例程已经启动。
Total System Global Area 105979576 bytes
Fixed Size 454328 bytes
Variable Size 79691776 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
4. 打开根据提示,编辑在第1步生成的c:\RebuildCtl.sql文件如下;
# The following commands will create a new control file and use it
# to open the database.
# Data used by the recovery manager will be lost. Additional logs may
# be required for media recovery of offline data files. Use this
# only if the current version of all online logs are available.
#STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS NOARCHIVELOG
-- SET STANDBY TO MAXIMIZE PERFORMANCE
MAXLOGFILES 5
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 226
LOGFILE
GROUP 1 'D:\ORACLE\ORADATA\ORCL\REDO01.LOG' SIZE 100M,
GROUP 2 'D:\ORACLE\ORADATA\ORCL\REDO02.LOG' SIZE 100M,
GROUP 3 'D:\ORACLE\ORADATA\ORCL\REDO03.LOG' SIZE 100M
-- STANDBY LOGFILE
DATAFILE
'D:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF',
'D:\ORACLE\ORADATA\ORCL\UNDOTBS01.DBF',
'D:\ORACLE\ORADATA\ORCL\INDX01.DBF',
'D:\ORACLE\ORADATA\ORCL\TOOLS01.DBF',
'D:\ORACLE\ORADATA\ORCL\USERS01.DBF'
CHARACTER SET US7ASCII
;
# Recovery is required if any of the datafiles are restored backups,
# or if the last shutdown was not normal or immediate.
# RECOVER DATABASE
# Database can now be opened normally.
# ALTER DATABASE OPEN;
# Commands to add tempfiles to temporary tablespaces.
# Online tempfiles have complete space information.
# Other tempfiles may require adjustment.
# ALTER TABLESPACE TEMP ADD TEMPFILE 'D:\ORACLE\ORADATA\ORCL\TEMP01.DBF' REUSE;
# End of tempfile additions.
5..运行上面的文件,
SQL>@c:\RebuildCtl.sql
完成重建控制文件,成功打开数据库。