_allow_resetlogs_corruption打开数据库
我在模拟归档日志丢失,不完全恢复的时候,无法打开数据,最后采用_allow_resetlogs_corruption进行打开
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01152: file 9 was not restored from a sufficiently old backup
ORA-01110: data file 9:
'/u01/app/oracle/oradata/ora12c/ora12cpdb1/system01.dbf'
SQL>
SQL> startup force;
ORACLE instance started.
Total System Global Area 771751936 bytes
Fixed Size 8797536 bytes
Variable Size 566231712 bytes
Database Buffers 192937984 bytes
Redo Buffers 3784704 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
备份spfile
SQL> create pfile='/home/oracle/pfile.txt' from spfile;
File created.
开启_allow_resetlogs_corruption
SQL> alter system set "_allow_resetlogs_corruption"=true scope=spfile;
尝试恢复
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 2184138 generated at 12/11/2019 01:29:23 needed for thread 1
ORA-00289: suggestion : /u01/app/oracle/archive_log/1_41_1026270447.dbf
ORA-00280: change 2184138 for thread 1 is in sequence #41
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00308: cannot open archived log
'/u01/app/oracle/archive_log/1_41_1026270447.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 7
ORA-00308: cannot open archived log
'/u01/app/oracle/archive_log/1_41_1026270447.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 7
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 9 was not restored from a sufficiently old backup
ORA-01110: data file 9:
'/u01/app/oracle/oradata/ora12c/ora12cpdb1/system01.dbf'
重启动
SQL> startup force;
ORACLE instance started.
Total System Global Area 771751936 bytes
Fixed Size 8797536 bytes
Variable Size 566231712 bytes
Database Buffers 192937984 bytes
Redo Buffers 3784704 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
SQL> alter database open resetlogs;
Database altered.
关闭_allow_resetlogs_corruption
SQL> alter system set "_allow_resetlogs_corruption"=false scope=spfile;
System altered.
打开数据库
SQL> startup force;
ORACLE instance started.
Total System Global Area 771751936 bytes
Fixed Size 8797536 bytes
Variable Size 566231712 bytes
Database Buffers 192937984 bytes
Redo Buffers 3784704 bytes
Database mounted.
Database opened.
SQL>
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?