rac rman备份和恢复 1
和单实例的备份和恢复稍有不同,ORACLE RAC主要是有多个实例,但是千万不要把多实例和多数据库搞混淆,在RAC中通常情况下一台服务器就是一个实例,多台服务器有一个共享存储,存储可以用RAW AMS OCFS2,而每个实例都有自己的后台进程,比如DBWR LGWR等,当然也包含RAC特有的进程LMSX LMD0等,rac通过CACHE FUSION机制达到了多节点的BUFFER CACHE共享,通过广播机制达到shared_pool的共享。这些是通过私有IP进行传递的。
但是RAC中其实数据文件,控制文件只有一份,但是日志文件每个节点都有。我一般使用控制文件来存储RMAN备份信息,所以从这里可以知道不管你再哪个节点进行RMAN备份但是其备份信息的记录都是存储在共用的控制文件中的,因此不管在哪个节点进行备份都没有影响,但是如果是归档模式,就要注意归档日志文件是每个节点都有的,但是在恢复的时候需要用到各个节点的归档日志文件,所以必须要使用NFS,OCFS或者log_archive_dest_N来设置各个节点都能访问这个目录,同时如果要在每个节点都能恢复,最好备份的备份集每个节点都能访问,并且在各个节点相同,当然这些不是必须只是为了恢复起来方便。
下面是一个测试,测试目的
1、在节点1进行备份,节点2进行恢复的测试
2、用较新的控制文件,来恢复较旧的备份集合,测试归档日志备份集的应用。
3、测试所有的控制文件和数据文件都已经丢失的不完全恢复
环境:
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Prod
PL/SQL Release 10.2.0.5.0 - Production
CORE10.2.0.5.0 Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
设置NFS目录在2个节点中共享
/archivelog
设置归档存储在/archivelog中
log_archive_dest_1 string location=/archivelog
1、 首先在节点1中执行全备份
RMAN> backup database format='/archivelog/bak_%s_%p_%t.bak';
Starting backup at 14-MAR-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=151 instance=ppzhu2 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00004 name=/dev/raw/raw10
input datafile fno=00005 name=/dev/raw/raw8
input datafile fno=00001 name=/dev/raw/raw5
input datafile fno=00003 name=/dev/raw/raw6
input datafile fno=00002 name=/dev/raw/raw7
channel ORA_DISK_1: starting piece 1 at 14-MAR-11
channel ORA_DISK_1: finished piece 1 at 14-MAR-11
piece handle=/archivelog/bak_10_1_745770568.bak tag=TAG20110314T142928 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 14-MAR-11
channel ORA_DISK_1: finished piece 1 at 14-MAR-11
piece handle=/archivelog/bak_11_1_745770603.bak tag=TAG20110314T142928 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 14-MAR-11
2、 在2个节点同时进行多次日志切换,生成多个日志文件。
SQL> alter system switch logfile;
System altered.
SQL> r
1* alter system switch logfile
System altered.
3、 再次在节点1进行全备份,这次备份归档备份集,并且删除备份了的归档日志文件
RMAN> backup format='/archivelog/bak_%t_%s_%p.bak' database plus archivelog delete all input
2> format '/archivelog/arch_%t_%s_%p.bak';
Starting backup at 14-MAR-11
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=125 instance=ppzhu2 devtype=DISK
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=119 recid=11 stamp=745538439
input archive log thread=1 sequence=120 recid=12 stamp=745556408
input archive log thread=1 sequence=121 recid=14 stamp=745572399
input archive log thread=1 sequence=122 recid=15 stamp=745606815
input archive log thread=1 sequence=123 recid=17 stamp=745639858
input archive log thread=1 sequence=124 recid=18 stamp=745659904
input archive log thread=1 sequence=125 recid=20 stamp=745693234
input archive log thread=1 sequence=126 recid=21 stamp=745725639
input archive log thread=1 sequence=127 recid=23 stamp=745761352
input archive log thread=1 sequence=128 recid=24 stamp=745761422
input archive log thread=1 sequence=129 recid=28 stamp=745770653
input archive log thread=1 sequence=130 recid=31 stamp=745770712
input archive log thread=1 sequence=131 recid=32 stamp=745770718
input archive log thread=1 sequence=132 recid=33 stamp=745771003
input archive log thread=2 sequence=94 recid=13 stamp=745556395
input archive log thread=2 sequence=95 recid=16 stamp=745619079
input archive log thread=2 sequence=96 recid=19 stamp=745680236
input archive log thread=2 sequence=97 recid=22 stamp=745744528
input archive log thread=2 sequence=98 recid=25 stamp=745761454
input archive log thread=2 sequence=99 recid=26 stamp=745761459
input archive log thread=2 sequence=100 recid=27 stamp=745770635
input archive log thread=2 sequence=101 recid=29 stamp=745770643
input archive log thread=2 sequence=102 recid=30 stamp=745770654
input archive log thread=2 sequence=103 recid=34 stamp=745770987
channel ORA_DISK_1: starting piece 1 at 14-MAR-11
channel ORA_DISK_1: finished piece 1 at 14-MAR-11
piece handle=/archivelog/arch_745770993_12_1.bak tag=TAG20110314T143632 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:36
channel ORA_DISK_1: deleting archive log(s)
archive log filename=/archivelog/1_119_743871413.dbf recid=11 stamp=745538439
archive log filename=/archivelog/1_120_743871413.dbf recid=12 stamp=745556408
archive log filename=/archivelog/1_121_743871413.dbf recid=14 stamp=745572399
archive log filename=/archivelog/1_122_743871413.dbf recid=15 stamp=745606815
archive log filename=/archivelog/1_123_743871413.dbf recid=17 stamp=745639858
archive log filename=/archivelog/1_124_743871413.dbf recid=18 stamp=745659904
archive log filename=/archivelog/1_125_743871413.dbf recid=20 stamp=745693234
archive log filename=/archivelog/1_126_743871413.dbf recid=21 stamp=745725639
archive log filename=/archivelog/1_127_743871413.dbf recid=23 stamp=745761352
archive log filename=/archivelog/1_128_743871413.dbf recid=24 stamp=745761422
archive log filename=/archivelog/1_129_743871413.dbf recid=28 stamp=745770653
archive log filename=/archivelog/1_130_743871413.dbf recid=31 stamp=745770712
archive log filename=/archivelog/1_131_743871413.dbf recid=32 stamp=745770718
archive log filename=/archivelog/1_132_743871413.dbf recid=33 stamp=745771003
archive log filename=/archivelog/2_94_743871413.dbf recid=13 stamp=745556395
archive log filename=/archivelog/2_95_743871413.dbf recid=16 stamp=745619079
archive log filename=/archivelog/2_96_743871413.dbf recid=19 stamp=745680236
archive log filename=/archivelog/2_97_743871413.dbf recid=22 stamp=745744528
archive log filename=/archivelog/2_98_743871413.dbf recid=25 stamp=745761454
archive log filename=/archivelog/2_99_743871413.dbf recid=26 stamp=745761459
archive log filename=/archivelog/2_100_743871413.dbf recid=27 stamp=745770635
archive log filename=/archivelog/2_101_743871413.dbf recid=29 stamp=745770643
archive log filename=/archivelog/2_102_743871413.dbf recid=30 stamp=745770654
archive log filename=/archivelog/2_103_743871413.dbf recid=34 stamp=745770987
Finished backup at 14-MAR-11
Starting backup at 14-MAR-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00004 name=/dev/raw/raw10
input datafile fno=00005 name=/dev/raw/raw8
input datafile fno=00001 name=/dev/raw/raw5
input datafile fno=00003 name=/dev/raw/raw6
input datafile fno=00002 name=/dev/raw/raw7
channel ORA_DISK_1: starting piece 1 at 14-MAR-11
channel ORA_DISK_1: finished piece 1 at 14-MAR-11
piece handle=/archivelog/bak_745771030_13_1.bak tag=TAG20110314T143709 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 14-MAR-11
channel ORA_DISK_1: finished piece 1 at 14-MAR-11
piece handle=/archivelog/bak_745771065_14_1.bak tag=TAG20110314T143709 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 14-MAR-11
Starting backup at 14-MAR-11
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=133 recid=36 stamp=745771084
input archive log thread=2 sequence=104 recid=35 stamp=745771067
channel ORA_DISK_1: starting piece 1 at 14-MAR-11
channel ORA_DISK_1: finished piece 1 at 14-MAR-11
piece handle=/archivelog/arch_745771069_15_1.bak tag=TAG20110314T143749 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
channel ORA_DISK_1: deleting archive log(s)
archive log filename=/archivelog/1_133_743871413.dbf recid=36 stamp=745771084
archive log filename=/archivelog/2_104_743871413.dbf recid=35 stamp=745771067
Finished backup at 14-MAR-11
可以看到这里我的归档日志文件和备份集都存放在/archivelog中。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24558279/viewspace-746600/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24558279/viewspace-746600/
rac rman备份和恢复 1相关推荐
- rac rman备份和恢复
RAC Rman备份和恢复 和单实例的备份和恢复稍有不同,ORACLE RAC主要是有多个实例,但是千万不要把多实例和多数据库搞混淆,在RAC中通常情况下一台服务器就是一个实例,多台服务器有一个共享存 ...
- rac rman 备份和恢复 1
原创转载请注明出处 rac rman 备份和恢复 和单实例的备份和恢复稍有不同,ORACLE RAC主要是有多个实例,但是千万不要把多实例和多数据库搞混淆,在RAC中通常情况下一台服务器就是一个实例, ...
- oracle rac rman回滚,rac rman 备份和恢复 2
4.再次在2个节点进行多次日志切换 SQL> alter system switch logfile; System altered. SQL> r 1* alter system swi ...
- Oracle 10g RAC RMAN备份异机单实例恢复
本文通过将Oracle 10g RAC RMAN的完整的备份进行异机恢复的过程,可以对在恢复的过程中可以发现备份时的一些问题.比如规档日志的冗余,控制文件与参数文件的自动备份的利用等,本示例是拿了rm ...
- RAC RMAN备份
这篇主要介绍的是RAC 环境下的RMAN 备份. 关于Oracle 备份与恢复的一些理论知识参考我的Blog: Oracle 备份 与 恢复 概述 http://blog.csdn.net ...
- oracle adg 备份,Oracle Physical Dataguard环境使用RMAN备份和恢复
Oracle Physical Dataguard环境使用RMAN备份和恢复 由于Physical Dataguard使用的是块恢复技术来保持和PRIMARY的一致性,因此可以在STANDBY 上进行 ...
- mysql 备份 没有自动删除文件_删掉spfile在没有自动备份控制文件下从以前的rman备份中恢复数据库...
1.首先要有一个包含spfile备份的rman备份: run { allocate channel c1 device type disk; allocate channel c2 device ty ...
- 从rman 备份中恢复表
先熟悉下 " 从rman 备份中恢复表" 的背景以及要求: 在 RMAN 中提供了表级别恢复( RECOVER TABLE ).在 Oracle 12c 中,在发生 drop 或 ...
- RMAN 的优缺点及RMAN 备份及恢复步骤
一. RMAN 备份的一些优点 和OS命令备份方式相比,使用RMAN的优点 1 备份执行期间不需要人工干预,因此减少了误操作的机会: 2 可以有效的将备份和恢复结合起来: 3 支持除逻辑备份以外 ...
最新文章
- c# 连接Redis报错:WRONGTYPE Operation against a key holding the wrong kind of value:类型搞混弄出的错误...
- 08 域控 架构主机 转移_论无服务器架构的特征
- springboot快速集成swagger
- Redis 的 8 大应用场景
- java下传图片到tomcat服务器后,如何在页面显示,java图片上传服务器及客户端显示图片...
- 修改mysql root的秘密
- 穷举法求最大公共子序列C语言,算法--最长公共子序列(LongestCommon Subsequence, LCS)...
- Java常用算法手册-01算法概述
- 苏州外壳防护试验IP防尘防水测试IP65 IP66 IP69K
- android TV for x86,“掌上TV”的第一步,Android TV x86 体验分享
- java开发设置用户头像_如何修改 WordPress 的用户默认头像?
- D2D 学习笔记第一课 初始化D2D 画一个矩形
- android-自定义ImageView-圆形图片绘制代码详解
- 简单实用 Firefox最有用的20大插件热力推荐
- 图卷积神经网络(GCN)综述与实现(PyTorch版)
- springboot中使用aliyun的oss
- Python量化编程如何判断均线数据是金叉还是死叉?-股市数据均线策略编程分析
- Android中自带的list布局
- mysql 字段 大于0_mysql 字段类型
- Scala并发编程(二)之 Akka
热门文章
- java计算机毕业设计双峰县在线房屋租售网站源代码+数据库+系统+lw文档
- WIN10用virtualbox装ubuntu系统清理磁盘方法
- 绿色版的PDF格式转换软件
- 巨丝滑 —— 自己动手撸一个图片编辑器(支持长图)
- factorio蓝图代码_异星工厂 自制MOD代码修改教程
- 荣耀x6平板支持鸿蒙吗,荣耀平板X6
- 【日常记录】接入短信发送功能,为实现完整的注册功能做准备
- 高端电视画质,专业游戏性能,三星Neo QLED这样俘获玩家
- select菜单实现二级联动
- 切片器可以设置日期格式?_数据透视表的切片器(与图表或者透视表进行无缝连接)[简单]...