问题描述:备库open数据库时报错ORA-10458、ORA-16191,如下所示:标签:备库,database,leo,orcl151,oracle,dbs,10458,ORA From: https://blog.51cto.com/u_12991611/6033871
系统:centos 7.9
数据库:oracle 11.2.0.4
主机名:主库leo-oel150 +备库leo-oel151
1、异常重现
SYS@orcl151> alter database open;
alter database open
*
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01152: file 4 was not restored from a sufficiently old backup
ORA-01110: data file 4: '/u01/app/oracle/oradata/orcl151/users01.dbf'
告警日志:
2023-02-02 17:17:29.041000 +08:00
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
returning error ORA-16191
------------------------------------------------------------
FAL[client, ARC3]: Error 16191 connecting to ORCL150 for fetching gap sequence
2023-02-02 17:18:28.011000 +08:00
Standby crash recovery failed to bring standby database to a consistent
point because needed redo hasn't arrived yet.
MRP: Wait timeout: thread 1 sequence# 0
Standby Crash Recovery aborted due to error 16016.
Errors in file /u01/app/oracle/diag/rdbms/orcl151/orcl151/trace/orcl151_ora_24425.trc:
ORA-16016: archived log for thread 1 sequence# 28 unavailable
Recovery interrupted!
Completed Standby Crash Recovery.
2、问题分析
根据trace日志报错ORA-16191,想起此前在主库对sys密码进行过修改,虽然后面有将其改回原密码,不过初步判断该异常跟此变动有关系.
3、解决过程
--主库操作
[oracle@leo-oel150 dbs]$ pwd
/u01/app/oracle/product/11.2.0/db_1/dbs
[oracle@leo-oel150 dbs]$ scp orapworcl150 [email protected]:/u01/app/oracle/product/11.2.0/db_1/dbs
[email protected]'s password:
orapworcl150 100% 1536 930.2KB/s 00:00
--备库操作
[oracle@leo-oel151 dbs]$ pwd
/u01/app/oracle/product/11.2.0/db_1/dbs
[oracle@leo-oel151 dbs]$ mv orapworcl151 orapworcl151bak
[oracle@leo-oel151 dbs]$ mv orapworcl150 orapworcl151
[oracle@leo-oel151 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Feb 2 20:27:34 2023
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SYS@orcl151> startup mount;
ORACLE instance started.
Total System Global Area 1586708480 bytes
Fixed Size 2253624 bytes
Variable Size 989859016 bytes
Database Buffers 587202560 bytes
Redo Buffers 7393280 bytes
Database mounted.
SYS@orcl151> alter database recover managed standby database using current logfile disconnect from session;
Database altered.
SYS@orcl151> alter database recover managed standby database cancel;
Database altered.
SYS@orcl151> alter database open;
Database altered.
SYS@orcl151> alter database recover managed standby database using current logfile disconnect from session;
Database altered.
说明:备库成功open.