模拟控制文件丢失-数据文件和日志文件都是最新,但备份是上一次resetlogs之前...

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博客 ” ,链接:http://blog.itpub.net/31448824/viewspace-2137536/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/31448824/viewspace-2137536/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值