rac rman 备份和恢复 1
原创转载请注明出处
rac rman 备份和恢复
和单实例的备份和恢复稍有不同,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
CORE 10.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/7728585/viewspace-689432/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7728585/viewspace-689432/
rac rman 备份和恢复 1相关推荐
- rac rman备份和恢复
RAC Rman备份和恢复 和单实例的备份和恢复稍有不同,ORACLE RAC主要是有多个实例,但是千万不要把多实例和多数据库搞混淆,在RAC中通常情况下一台服务器就是一个实例,多台服务器有一个共享存 ...
- rac rman备份和恢复 1
和单实例的备份和恢复稍有不同,ORACLE RAC主要是有多个实例,但是千万不要把多实例和多数据库搞混淆,在RAC中通常情况下一台服务器就是一个实例,多台服务器有一个共享存储,存储可以用RAW AMS ...
- 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 支持除逻辑备份以外 ...
最新文章
- python双引号报错_Python中select语句中的双引号”“怎么处理
- Scala模式匹配细节说明
- 基于Docker搭建私有镜像仓库
- python网页填表教程_PythonSpot 中文系列教程 · 翻译完成
- nginx文件系统大小_详解Nginx系列
- 【AD】PCB设计知识整理(持续更新)
- JavaScript学习(六十九)—正则表达式实训题
- Python编程练习:使用 turtle 库完成六边形的绘制
- Luogu P2827 蚯蚓
- php 日历设置当月节假_带节假日设置的日历
- Security+ 学习笔记13 加密基础
- 【css】内容不足时底部footer不在最低部解决办法
- 标准正态分布表完整图 查询_正态分布基本概念及Excel实现
- GIS应用技巧之制作土地利用转移矩阵表
- 2023年太原理工大学水利工程考研考情与难度、参考书前辈备考经验
- php实现微信小程序登陆功能
- 系统全面讲解word中选择性粘贴命令
- app 评论功能实现
- NATS中文开发文档:连接
- 分析和解决:ERR Error compiling script (new function): user_script:1: 'end' expected near '
热门文章
- 报错 AssertionError: Torch not compiled with CUDA enabled
- Android的LMK机制学习笔记
- 2022年,又新出来一个Python学习神器
- 【sprigboot】JavaEE开发的颠覆者SpringBoot实战第八章部分 JPA Cache 事务 总结
- php获取芝麻分,PHP编程:PHP 芝麻信用接入的注意事项
- 计算ORACLE使用内存方法(on AIX)
- python怎么画两张图_python中如何用subplot画多个子图?
- HP_LaserJet_M153_M154_Printer_series_20200612.EXE 固件
- linux上搜狗输入法的安装,Fedora 18 下 搜狗输入法的安装
- 聊聊项目测试时间不足怎么办