分享
 
 
 

使用Rman的Plus archvielog选项简化数据库备份操作

王朝other·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

Oracle9i开始Rman提供plus archivelog选项,极大的简化了Rman备份的操作。

当你定义plus archivelog语句时,RMAN执行如下步骤的操作:

1。运行一个ALTER SYSTEM ARCHIVELOG CURRENT命令

2。运行BACKUP ARCHIVELOG ALL命令。注意如果备份优化被启用,RMAN只会备份未备份过的日志

3。备份BACKUP命令中定义的文件

4。运行ALTER SYSTEM ARCHIVELOG CURRENT命令

5。备份所有的剩下的归档日志

测试备份脚本:

backup database

format '/opt/oracle/orabak/full_%d_%T_%s'

plus archivelog

format '/opt/oracle/orabak/arch_%d_%T_%s'

delete all input;

测试日志:

[oracle@jumper oracle]$ rman target /

Recovery Manager: Release 9.2.0.4.0 - Production

Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.

connected to target database: CONNER (DBID=3152029224)

RMAN> run {

2> backup database

3> format '/opt/oracle/orabak/full%d_%T_%s'

4> plus archivelog

5> format '/opt/oracle/orabak/arch_%d_%T_%s'

6> delete all input; }

Starting backup at 04-NOV-04

current log archived

using target database controlfile instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=12 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=163 recid=6 stamp=541351580

channel ORA_DISK_1: starting piece 1 at 04-NOV-04

channel ORA_DISK_1: finished piece 1 at 04-NOV-04

piece handle=/opt/oracle/orabak/arch_CONNER_20041104_7 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=/opt/oracle/oradata/conner/archive/1_163.dbf recid=6 stamp=541351580

Finished backup at 04-NOV-04

Starting backup at 04-NOV-04

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backupset

channel ORA_DISK_1: specifying datafile(s) in backupset

including current SPFILE in backupset

including current controlfile in backupset

input datafile fno=00004 name=/opt/oracle/oradata/conner/eygle01.dbf

input datafile fno=00001 name=/opt/oracle/oradata/conner/system01.dbf

input datafile fno=00002 name=/opt/oracle/oradata/conner/undotbs01.dbf

input datafile fno=00003 name=/opt/oracle/oradata/conner/users01.dbf

channel ORA_DISK_1: starting piece 1 at 04-NOV-04

aaaachannel ORA_DISK_1: finished piece 1 at 04-NOV-04

piece handle=/opt/oracle/orabak/full_CONNER_20041104_8 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:04:04

Finished backup at 04-NOV-04

Starting backup at 04-NOV-04

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=164 recid=7 stamp=541351832

channel ORA_DISK_1: starting piece 1 at 04-NOV-04

channel ORA_DISK_1: finished piece 1 at 04-NOV-04

piece handle=/opt/oracle/orabak/arch_CONNER_20041104_9 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=/opt/oracle/oradata/conner/archive/1_164.dbf recid=7 stamp=541351832

Finished backup at 04-NOV-04

RMAN>

通过plus archivelog,简化了备份操作,同时确保需要的日志都被备份。

[oracle@jumper orabak]$ ls -l

total 751628

-rw-r----- 1 oracle dba 156160 Nov 4 15:26 arch_CONNER_20041104_7

-rw-r----- 1 oracle dba 60928 Nov 4 15:30 arch_CONNER_20041104_9

-rw-r----- 1 oracle dba 768679936 Nov 4 15:30 full_CONNER_20041104_8

本文作者:

eygle,Oracle技术关注者,来自中国最大的Oracle技术论坛itpub.

www.eygle.com是作者的个人站点.你可通过Guoqiang.Gai@gmail.com来联系作者.欢迎技术探讨交流以及链接交换.

原文出处:

http://www.eygle.com/ha/Use.Rman.Plus.Archivelog.Option.htm

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有