SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
[oracle@localhost NACEC]$ rm -rf *.ctl
SQL> startup;
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1267836 bytes
Variable Size 356517764 bytes
Database Buffers 58720256 bytes
Redo Buffers 2924544 bytes
ORA-00205: error in identifying control file, check alert log for more info
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1267836 bytes
Variable Size 356517764 bytes
Database Buffers 58720256 bytes
Redo Buffers 2924544 bytes
[oracle@localhost wqbf]$ cp *.ctl /dat/DBData/oradata/NACEC/
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1267836 bytes
Variable Size 356517764 bytes
Database Buffers 58720256 bytes
Redo Buffers 2924544 bytes
Database mounted.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01190: control file or data file 1 is from before the last RESETLOGS
ORA-01110: data file 1: '/dat/DBData/oradata/NACEC/system01.dbf'
无论采用什么方法,都打不开DB,因为我之前已经resetlogs数据库了,所以之前的控制文件备份不好用
如果没有resetlogs过数据库,采用alter database using backup controlfile(until cancel)即可恢复
只能采用其他的方法了
[oracle@localhost dbs]$ vi initNACEC.ora
在初始化参数文件里面添加_allow_resetlogs_corruption=true
SQL> startup pfile='/dat/DBSoftware/oracle/product/10.2.0/db_1/dbs/initNACEC.ora';
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1267836 bytes
Variable Size 356517764 bytes
Database Buffers 58720256 bytes
Redo Buffers 2924544 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open resetlogs;
Database altered.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31448824/viewspace-2137536/ ,如需转载,请注明出处,否则将追究法律责任。