RAC环境备份,RMAN异机在单实例环境恢复redo问题
目的:客户环境11.2.0.4 ,多节点RAC环境,现在使用带库的备份,在单机环境测试备份有效性
1.normal参数文件
删除集群相关参数cluster
2.mount 使用备份的控制文件进行还原
3.restore database,recover database 到预想的位置(建议recover时间,低于控制文件中记录归档日志的前30分钟或者前15分钟)
run{
allocate channel c1 device type 'sbt_type'
PARMS="ENV=(MASTER_SERVER_IP=XXX,INSTANCE_NAME=oraxxx,BACKUP_CLIENT=TTXXX,RESTORE_CLIENT=RecoveryFxxxx)";
set newname for database to '/u01/xxx/%b‘;
sql 'alter session set NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"';
sql 'alter session set NLS_LANGUAGE=American';
set until time '2019-xx-xx 18:00:00';
restore database;
SWITCH DATAFILE ALL;
recover database;
} --参考http://blog.itpub.net/30126024/viewspace-2142843/ SET NEWNAME FOR DATAFILE to '/oracle/ora11g/oradata/system01.dbf';
SET NEWNAME FOR TEMPFILE to '/oracle/ora11g/oradata/temp01.dbf';
RESTORE DATABASE;
SWITCH DATAFILE ALL;
SWITCH TEMPFILE ALL;
4.resetlogs open DB,客户再此处遇到问题
ALTER DATABASE OPEN RESETLOGS fails with ORA- (Doc ID 1352133.1)
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-00392: log 1 of thread 1 is being cleared, operation not allowed
ORA-00312: online log 1 thread 1: '/<PATH>/group_1.log'
ORA-00312: online log 1 thread 1: '/<PATH>/group_12.log' SQL> select GROUP#,THREAD#,SEQUENCE#,MEMBERS,ARCHIVED,STATUS,FIRST_CHANGE# from v$log order by first_change# ;
GROUP# THREAD# SEQUENCE# MEMBERS ARCHIVED STATUS FIRST_CHANGE#
------------- ----------- ----------- -------------- ---------- ---------------- -------------------
2 1 0 2 YES CLEARING 12142264718335
3 1 0 2 YES CLEARING 12142306351551
1 1 0 2 NO CLEARING_CURRENT 12142306351562
3 rows selected.
如下CLEARING_CURRENT解释说明
Failure of CLEAR LOGFILE Operation
The ALTER DATABASE CLEAR LOGFILE statement can fail with an I/O error due to
media failure when it is not possible to:
* Relocate the redo log file onto alternative media by re-creating it under
the currently configured redo log filename
* Reuse the currently configured log filename to re-create the redo log file
because the name itself is invalid or unusable (for example, due to media failure)
In these cases, the ALTER DATABASE CLEAR LOGFILE statement (before receiving the I/O error) would
have successfully informed the control file that the log was being cleared and did not require archiving.
The I/O error occurred at the step in which the CLEAR LOGFILE statement attempts to create the new
redo log file and write zeros to it. This fact is reflected in V$LOG.CLEARING_CURRENT.
操作报错,重置redo报错,由于redo均为+DATA磁盘组,而实际上单实例环境为文件系统,无法重置
alter database clear unarchived logfile group 3 ;
alter database open resetlogs;
SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE AS '/tmp/control.sql' resetlogs ;
SQL> STARTUP FORCE NOMOUNT
SQL> @/tmp/control.sql
SQL> ALTER DATABASE OPEN RESETLOGS ;
上述是按照MOS文档的预期值,可以解决问题,如下是博客链接,可以根据如下进行修改控制文件。
http://blog.itpub.net/30126024/viewspace-2144906/
MOS文档写的过于简单,只是说修改控制文件,根据上述博客链接,可分为几个步骤
1.备份控制文件,生成trace,默认控制文件二进制无法读取
2.删除关于控制文件中,对于redo的信息,修改调整为
LOGFILE ······
GROUP 1 (
'/oracle/ora11g/oradata/redo01.log'
) SIZE 50M BLOCKSIZE 512,
GROUP 2 (
'/oracle/ora11g/oradata/redo02.log'
) SIZE 50M BLOCKSIZE 512,
DATAFILE ······
3.shutdown abort DB,使用新编辑的控制文件,启动到mount状态
4.创建其它线程的redo,存在多线程redo,则创建多个thread redo信息
ALTER DATABASE ADD LOGFILE THREAD 2
GROUP 3 '/oracle/ora11g/oradata/redo03.dbf' SIZE 50M,GROUP 4 '/oracle/ora11g/oradata/redo04.dbf' SIZE 50M;
5.启动DB
ALTER DATABASE OPEN RESETLOGS;
6.单机删除多余的thread 2的在线日志
alter database disable thread 2;
alter database drop logfile group 3;
备注:如下是客户并未添加其它线程redo,直接open resetlogs出现如下报错
上述根据博客链接的说明,可以解决问题,另一种方法,则是通过设置隐患参数,强制OPEN,均可以,具体实施看需求。
RMAN Duplicate from RAC backup fails ORA-38856 (Doc ID 334899.1)
RMAN duplicate using a backup taken from a RAC installation fails on opening the clone instance with
RMAN-: ORACLE error from auxiliary database: ORA-: cannot mark instance UNNAMED_INSTANCE_2 (redo thread ) as enabled The target database is a RAC two node database being duplicated to a single instance database. _no_recovery_through_resetlogs=TRUE
RAC环境备份,RMAN异机在单实例环境恢复redo问题的更多相关文章
- Oracle 单实例 迁移到 RAC 实例 -- 使用RMAN 异机恢复
Oracle 官网有关单实例迁移到RAC的一个步骤说明: How to Convert 10g Single-Instance database to 10g RAC using Manual Con ...
- Oracle12c RAC RMAN异机恢复
######################################################## #编辑pfile文件initspdb.ora vi /oracle/app/oracl ...
- RMAN异机恢复遭遇ORA-01547、ORA-01152、ORA-01110错误案例
测试环境: 操作系统 : Red Hat Enterprise Linux ES release 4 (Nahant Update 4) VMWARE 数据库 : O ...
- Linux平台下RMAN异机恢复总结
下面总结.整理一下RMAN异机恢复这方面的知识点,这篇笔记在个人笔记里面躺了几年了,直到最近偶然被翻看到,遂整理.总结一下.如下所示,个人将整个RMAN异机恢复分为准备工作和操作步骤两大部分.当然,准 ...
- RMAN异机恢复实验---转载
一.RMAN异机恢复实验 2011年3月23日00:44 1.环境介绍: 主机1: 操作系统 REDHAT5.5 IP地址 172.16.1.120 主机名 sigle 数据库版本 10.2.0.4 ...
- rman异机恢复,全部恢复和增量恢复
1.首先准备工作:hostname 192.168.222.11 ol7.localdomain ol7建立相关目录:mkdir -p /u01/app/oracle/oradata/DB11G/mk ...
- KingbaseES V8R3 备份恢复案例之--单实例环境sys_rman脚本备份案例
案例说明: sys_rman是KingbaseES数据库的物理备份工具,支持数据库的全备和增量备份,由于sys_rman工具使用需要配置多个参数,对于一般用户使用不是很方便.为方便用户在Kingbas ...
- rman异机恢复(RAC双节点恢复到单节点)
一.数据库全备 RUN {ALLOCATE CHANNEL ch00 DEVICE TYPE disk;ALLOCATE CHANNEL ch01 DEVICE TYPE disk;backup as ...
- rman 备份并异机恢复
1.RMAN 备份脚本 RUN { CONFIGURE RETENTION POLICY DAYS; CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE CO ...
随机推荐
- 前端VScode推荐插件
Auto Close Tag 自动添加HTML / XML关闭标签 Auto Rename Tag 自动重命名配对的HTML / XML标签 Beautify 格式化代码 [必须]Bracket Pa ...
- 关于SkyApm测试部署。
这个是skyapm的github : https://github.com/SkyAPM/SkyAPM-dotnet 它依赖于skywalking . 我是用docker去部署的.因为这样我的系统会干 ...
- 使用CAS实现单点登录功能
目录 单点登录 简介 CAS服务器部署 上传tomcat服务器压缩到文件夹/usr/local/cas目录下,解压,修改tomcat文件夹名为tomcat 修改tomcat配置文件的端口号 关闭tom ...
- bean名称相同冲突Annotation-specified bean name 'xx' for bean class [xxx] conflicts with existing, non-compatible bean definition of same name and class[xxx]
工程中引入其他工程的包,由于两个工程中有重名的两个bean,导致在启动时提示如下错误: 根据bean名称在ide中查找,找到这两个重名的类,可以看到由于这两个类使用@Service标注,此时如果不使用 ...
- typescript - 3.函数
(1)函数的定义 ## 函数声明法 // function run():string{ // return 'run'; // } //错误写法,返回类型错误 // function run():st ...
- [转] cmake源码编译安装jsoncpp
1.下载jsoncpp源码 wget https://github.com/open-source-parsers/jsoncpp/archive/master.zip 2.解压缩源码文件 unzip ...
- Android dump命令查看某个apk是被谁安装的?
adb shell dumpsys package packages > packageAll.txt ORadb shell pm dump packages > package ...
- 【转载】 《Human-level concept learning through probabilistic program induction》阅读笔记
原文地址: https://blog.csdn.net/ln1996/article/details/78459060 --------------------- 作者:lnn_csdn 来源:CSD ...
- WebGL学习笔记(三):绘制一个三角形
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Swift编码总结3
1.编码转换: dataString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? "" re ...