概述
主机备份拷贝到备机上进行Rman 还原,完成后用standy controlfile替换。
SQL*Plus: Release 12.2.0.1.0 Production on Fri May 15 11:06:00 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 5.3687E+10 bytes
Fixed Size 12174808 bytes
Variable Size 6710889000 bytes
Database Buffers 4.6842E+10 bytes
Redo Buffers 122040320 bytes
SQL> alter database mount standby database;
Database altered.
但是打开只读的时候出现错误:
SQL> alter database open read only;
alter database open read only
*
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u01/app/oracle/oradata/ep/system01.dbf'
尝试修复失败
SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
比对文件和控制文件的sn ,发现文件比控制文件要小。
SQL> select distinct CHECKPOINT_CHANGE# from v$datafile;
CHECKPOINT_CHANGE#
------------------
335610152
SQL> select CURRENT_SCN from v$database;
CURRENT_SCN
-----------
335617437
将最近的归档日志拷贝到standby机器上
RMAN> catalog start with '/u01/app/oracle/logfiles';
using target database control file instead of recovery catalog
searching for all files that match the pattern /u01/app/oracle/logfiles
List of Files Unknown to the Database
=====================================
File Name: /u01/app/oracle/logfiles/1_17714_1021954304.dbf
File Name: /u01/app/oracle/logfiles/1_17715_1021954304.dbf
RMAN> recover database;
Starting recover at 15-MAY-20
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=463 device type=DISK
starting media recovery
archived log for thread 1 with sequence 17715 is already on disk as file /u01/app/oracle/logfiles/1_17715_1021954304.dbf
archived log file name=/u01/app/oracle/logfiles/1_17715_1021954304.dbf thread=1 sequence=17715
media recovery complete, elapsed time: 00:01:29
Finished recover at 15-MAY-20
RMAN> quit
--重新打开数据库,成功。
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> alter database open read only;
Database altered.
最后
以上就是机灵长颈鹿为你收集整理的Dataguard还原测试故障ORA-10458的全部内容,希望文章能够帮你解决Dataguard还原测试故障ORA-10458所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复