问题描述:物理备库在open数据库时报错ORA-01190,如下所示:
数据库:oracle 11.2.0.4
1、异常重现
SYS@orcldg> alter database open;
alter database open
*
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01190: control file or data file 1 is from before the last RESETLOGS
ORA-01110: data file 1: '/u01/app/oracle/oradata/system.259.1132745549'
2、解决过程
SYS@orcldg> select hxfil file_id,
2 FHRLC "RESET TIME",
3 fhrlc_i "RESET COUNT",
4 FHRLS "RESET SCN",
5 FHPRC "LAST RESET TIME",
6 FHPRC_I "LAST RESET COUNT",
7 FHPRS "LAST RESET SCN"
8 from x$kcvfh;
FILE_ID RESET TIME RESET COUNT RESET SCN LAST RESET TIME LAST RESET COUNT LAST RESET SCN
---------- -------------------- ----------- ---------------- -------------------- ---------------- ----------------
1 03/29/2023 11:32:23 1132745543 1 0 0
2 03/29/2023 11:32:23 1132745543 1 0 0
3 03/29/2023 11:32:23 1132745543 1 0 0
4 03/29/2023 11:32:23 1132745543 1 0 0
5 03/29/2023 11:32:23 1132745543 1 0 0
6 03/29/2023 11:32:23 1132745543 1 0 0
7 03/29/2023 11:32:23 1132745543 1 0 0
8 03/29/2023 11:32:23 1132745543 1 0 0
9 03/29/2023 11:32:23 1132745543 1 0 0
10 03/29/2023 11:32:23 1132745543 1 0 0
11 03/29/2023 11:32:23 1132745543 1 0 0
FILE_ID RESET TIME RESET COUNT RESET SCN LAST RESET TIME LAST RESET COUNT LAST RESET SCN
---------- -------------------- ----------- ---------------- -------------------- ---------------- ----------------
12 03/29/2023 11:32:23 1132745543 1 0 0
13 03/29/2023 11:32:23 1132745543 1 0 0
14 03/29/2023 11:32:23 1132745543 1 0 0
15 03/29/2023 11:32:23 1132745543 1 0 0
16 03/29/2023 11:32:23 1132745543 1 0 0
17 03/29/2023 11:32:23 1132745543 1 0 0
18 03/29/2023 11:32:23 1132745543 1 0 0
18 rows selected.
SYS@orcldg> select hxfil,fhrls change#,fhrlc_i,fhrlc time from x$kcvfh;
HXFIL CHANGE# FHRLC_I TIME
---------- ---------------- ---------- --------------------
1 1 1132745543 03/29/2023 11:32:23
2 1 1132745543 03/29/2023 11:32:23
3 1 1132745543 03/29/2023 11:32:23
4 1 1132745543 03/29/2023 11:32:23
5 1 1132745543 03/29/2023 11:32:23
6 1 1132745543 03/29/2023 11:32:23
7 1 1132745543 03/29/2023 11:32:23
8 1 1132745543 03/29/2023 11:32:23
9 1 1132745543 03/29/2023 11:32:23
10 1 1132745543 03/29/2023 11:32:23
11 1 1132745543 03/29/2023 11:32:23
HXFIL CHANGE# FHRLC_I TIME
---------- ---------------- ---------- --------------------
12 1 1132745543 03/29/2023 11:32:23
13 1 1132745543 03/29/2023 11:32:23
14 1 1132745543 03/29/2023 11:32:23
15 1 1132745543 03/29/2023 11:32:23
16 1 1132745543 03/29/2023 11:32:23
17 1 1132745543 03/29/2023 11:32:23
18 1 1132745543 03/29/2023 11:32:23
18 rows selected.
SYS@orcldg> col name for a30
SYS@orcldg> col value for a20
SYS@orcldg> SELECT nam.ksppinm NAME, val.ksppstvl VALUE FROM x$ksppi nam, x$ksppsv val WHERE nam.indx = val.indx and nam.ksppinm='_allow_resetlogs_corruption';
NAME VALUE
------------------------------ --------------------
_allow_resetlogs_corruption FALSE
--设置_allow_resetlogs_corruption为true,在数据库open过程中会跳过某些一致性检查。
SYS@orcldg> alter system set "_allow_resetlogs_corruption"=true scope=spfile;
System altered.
SYS@orcldg> shutdown abort;
ORACLE instance shut down.
SYS@orcldg> startup mount;
ORACLE instance started.
Total System Global Area 2455228416 bytes
Fixed Size 2255712 bytes
Variable Size 620758176 bytes
Database Buffers 1811939328 bytes
Redo Buffers 20275200 bytes
Database mounted.
SYS@orcldg> alter database open;
Database altered.
SYS@orcldg> alter system set "_allow_resetlogs_corruption"=false scope=spfile;
System altered.
SYS@orcldg> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@orcldg> startup
ORACLE instance started.
Total System Global Area 2455228416 bytes
Fixed Size 2255712 bytes
Variable Size 620758176 bytes
Database Buffers 1811939328 bytes
Redo Buffers 20275200 bytes
Database mounted.
Database opened.
SYS@orcldg> alter database recover managed standby database using current logfile disconnect from session;
Database altered.
参考文档:
http://blog.itpub.net/29618264/viewspace-2124635/
https://www.xifenfei.com/tag/ora-01190
https://www.modb.pro/db/5099
物理备库在open数据库时报错ORA-01190
原创
©著作权归作者所有:来自51CTO博客作者Liujun_Deng的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:配置SQLDeveloper连接mysql时报错Message from server:”host ‘****’ is not allowed to connect to this mysql ser

提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
备库open数据库时报错ORA-10458、ORA-16191
备库open数据库时报错ORA-10458、ORA-16191
ORA-16191 dg ORA-10458 ORA-16016 -
物理备库在切换为主库时报错ORA-01577—主库已切换为备库
物理备库在切换为主库时报错ORA-01577—主库已切换为备库
oracle ORA-01577 -
数据库open时报错ORA-01210、ORA-01110、ORA-01122
数据库open时报错ORA-01210、ORA-01110、ORA-01122
ORA-01210 ORA-01110 ORA-01122 -
数据库在启动时报错ORA-32004
数据库在启动时报错ORA-32004
数据库 oracle sql -
数据库在执行全库恢复后,open时报错ORA-01113、ORA-01110 ORA-00312 ORA-01113
数据库在执行全库恢复后,open时报错ORA-01113、ORA-01110 ORA-00312 ORA-01113
ORA-01113 ORA-01110 ORA-00312 ORA-01113 -
ORA-01189;ORA-01111;ORA-01190;ORA-00600[2662]
设置隐藏参数 "_allow_resetlogs_corruption" = true , 强制起库;推进SCN;
ORA-01189 ORA-01111 ORA-01190 ORA-00600[2662] -
RMAN备份与恢复后UNDO表空间报错ORA-01190:ORA-01110;
rman恢复数据库至指定时间,undo报错修复
ORA-01190 ORA-01110 rman undo 恢复 -
dblogin登陆数据库时报错ORA-04060
dblogin登陆数据库时报错ORA-04060
ORA-04060 dblogin登陆数据库 -
还原mysql数据库时报错
mysql数据库还原时报错
mysql 还原