从ORA-01033 到重建控制文件
发布时间:2020-12-12 15:07:20 所属栏目:百科 来源:网络整理
导读:前言 之前的一个项目,闲置了很长时间后,再次打开提示 1.数据库未打开 ORA- 01033 : ORACLE initialization or shutdown in progress 查看当前数据库状态 SQL select status from v$instance; STATUS ------------ MOUNTED 2.数据库打开失败 发现当前数据库
前言之前的一个项目,闲置了很长时间后,再次打开提示 1.数据库未打开ORA-01033: ORACLE initialization or shutdown in progress
查看当前数据库状态 SQL> select status from v$instance;
STATUS ------------
MOUNTED
2.数据库打开失败发现当前数据库不是处于 那就 SQL>alter database open;
ORA-01122:数据库文件1验证失败
ORA-01110:数据文件1: 'D:APPADMINISTRATORORADATAORCLSYSTEM01.DBF'
ORA-01207:文件比控制文件更新-旧的控制文件
应该是控制文件出错了,只能 重建控制文件
1.生成可以重建控制文件的脚本SQL>alter database backup controlfile to trace as ‘D:trace’;
2.关闭数据库SQL>shutdown immediate;
3.启动到 nomount 状态下SQL>startup nomount; 4. 构造脚本打开 CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 'D:APPADMINISTRATORORADATAORCLREDO01.LOG' SIZE50M,GROUP 2 'D:APPADMINISTRATORORADATAORCLREDO02.LOG' SIZE50M,GROUP 3 'D:APPADMINISTRATORORADATAORCLREDO03.LOG' SIZE50M
DATAFILE
'D:APPADMINISTRATORORADATAORCLSYSTEM01.DBF','D:APPADMINISTRATORORADATAORCLUNDOTBS01.DBF','D:APPADMINISTRATORORADATAORCLSYSAUX01.DBF','D:APPADMINISTRATORORADATAORCLUSERS01.DBF',CHARACTER SET ZHS16GBK
;
对路径进行修正: CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS NOARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 'D:/APP/ADMINISTRATOR/ORADATA/ORCL/REDO01.LOG' SIZE50M,GROUP 2 'D:/APP/ADMINISTRATOR/ORADATA/ORCL/REDO02.LOG' SIZE50M,GROUP 3 'D:/APP/ADMINISTRATOR/ORADATA/ORCL/REDO03.LOG' SIZE50M DATAFILE 'D:/APP/ADMINISTRATOR/ORADATA/ORCL/SYSTEM01.DBF','D:/APP/ADMINISTRATOR/ORADATA/ORCL/UNDOTBS01.DBF','D:/APP/ADMINISTRATOR/ORADATA/ORCL/SYSAUX01.DBF','D:/APP/ADMINISTRATOR/ORADATA/ORCL/USERS01.DBF',CHARACTER SET ZHS16GBK ;
5. 恢复数据库SQL>alter database backup controlfile to trace as ‘D:trace’;
6.重新打开数据库SQL>alter database backup controlfile to trace as ‘D:trace’;
控制文件重建完毕,可以正常使用了(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |