ORA-01207:文件比控制文件更新 - 旧的控制文件
根据oracle文档的解释:
Cause: The control file change sequence number in the datafile 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 CONTROLFILE RECOVERY to make the control file current. Be sure to follow all restrictions on doing a BACKUP CONTROLFILE RECOVERY.
Solution:
1. Check alert file,kill monitor process
2. Startup mount,
3. “alter database backup control to trace”
4. Find the trace file,and open it
5. Startup nomount
6. recreate controlfile using resetlogs
7. “recover database using backup controlfile”
8. “alter database open resetlogs;”
9. “alter tablespace temp add tempfile '.dbf' reuse;”
详细步骤:
1.SQL>shutdown abort 如果数据库是打开状态,强行关闭
2.SQL>sqlplus / as sysdba
3.SQL>startup
ORACLE 例程已经启动。
Total System Global Area 293601280 bytes
Fixed Size 1248624 bytes
Variable Size 121635472 bytes
Database Buffers 167772160 bytes
Redo Buffers 2945024 bytes
数据库装载完毕。
ORA-01122: 数据库文件 1 验证失败
ORA-01110: 数据文件 1:
'F:\ORACLE\PRODUCT\10.2.0\DB_1\ORADATA\ORCLDW\SYSTEM01.DBF'
ORA-01207: 文件比控制文件更新 - 旧的控制文件
4.SQL>alter database backup controlfile to trace as 'f:\aa';
数据库已更改。
5.SQL>shutdown immediate 如果数据库是打开状态,则关闭
ORA-01109: 数据库未打开
已经卸载数据库
6.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
7.Editplus之类的编辑器打开在第四步生成的f:\aa文件;
其实在这个文件中的已经告诉你咋样恢复你的数据库了,找到STARTUP NOMOUNT字样,然后下面可以看到类似语句,这个文件有好几个类似的生成控制文件语句,主要针对不懂的环境执行不同的语句,象我的数据库没有做任何备份,也不是在归档模式,就执行这句
CREATE CONTROLFILE REUSE DATABASE "ORCLDW" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 'F:\ORACLE\PRODUCT\10.2.0\DB_1\ORADATA\ORCLDW\REDO01.LOG' SIZE 50M,
GROUP 2 'F:\ORACLE\PRODUCT\10.2.0\DB_1\ORADATA\ORCLDW\REDO02.LOG' SIZE 50M,
GROUP 3 'F:\ORACLE\PRODUCT\10.2.0\DB_1\ORADATA\ORCLDW\REDO03.LOG' SIZE 50M
DATAFILE
'F:\ORACLE\PRODUCT\10.2.0\DB_1\ORADATA\ORCLDW\SYSTEM01.DBF',
'F:\ORACLE\PRODUCT\10.2.0\DB_1\ORADATA\ORCLDW\UNDOTBS01.DBF',
'F:\ORACLE\PRODUCT\10.2.0\DB_1\ORADATA\ORCLDW\SYSAUX01.DBF',
'F:\ORACLE\PRODUCT\10.2.0\DB_1\ORADATA\ORCLDW\USERS01.DBF',
'F:\ORACLE\PRODUCT\10.2.0\DB_1\ORADATA\ORCLDW\EXAMPLE01.DBF'
CHARACTER SET ZHS16GBK
;
执行上面这段语句,这个语句重建控制文件,然后你可以看着f:\aa文件完成下面的恢复工作了,
8.SQL>RECOVER DATABASE (恢复指定表空间、数据文件或整个数据库)
9.SQL>ALTER DATABASE OPEN 打开数据库
阅读(721) | 评论(0) | 转发(0) |