• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

使用Rman的Plus archvielog选项简化数据_sqlserver

sqlserver 搞代码 3年前 (2018-06-16) 59次浏览 已收录 0个评论

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

当你定义plus archivelog语句时,RMAN执行如下步骤的操作:
1。运行一个ALTER SYSTEM ARCHIVELOG CURRENT命令
2。运行BACKUP ARCHIVELOG ALL命令。注意如果备份优化被启用,RMAN只会备份未备份过的日志

http://www.gaodaima.com/35897.html使用Rman的Plus archvielog选项简化数据_sqlserver

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;

 

测试日志:

 

 [[email protected] oracle]$ rman target /Recovery Manager: Release 9.2.0.4.0 – ProductionCopyright (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-04current log archivedusing target database controlfile instead of recovery catalogallocated channel: ORA_DISK_1channel ORA_DISK_1: sid=12 devtype=DISKchannel ORA_DISK_1: starting archive log backupsetchannel ORA_DISK_1: specifying archive log(s) in backup setinput archive log thread=1 sequence=163 recid=6 stamp=541351580channel ORA_DISK_1: starting piece 1 at 04-NOV-04channel ORA_DISK_1: finished piece 1 at 04-NOV-04piece handle=/opt/oracle/orabak/arch_CONNER_20041104_7 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:02channel ORA_DISK_1: deleting archive log(s)archive log filename=/opt/oracle/oradata/conner/archive/1_163.dbf recid=6 stamp=541351580Finished backup at 04-NOV-04Starting backup at 04-NOV-04using channel ORA_DISK_1channel ORA_DISK_1: starting full datafile backupsetchannel ORA_DISK_1: specifying datafile(s) in backupsetincluding current SPFILE in backupsetincluding current controlfile in backupsetinput datafile fno=00004 name=/opt/oracle/oradata/conner/eygle01.dbfinput datafile fno=00001 name=/opt/oracle/oradata/conner/system01.dbfinput datafile fno=00002 name=/opt/oracle/oradata/conner/undotbs01.dbfinput datafile fno=00003 name=/opt/oracle/oradata/conner/users01.dbfchannel ORA_DISK_1: starting piece 1 at 04-NOV-04aaaachannel ORA_DISK_1: finished piece 1 at 04-NOV-04piece handle=/opt/oracle/orabak/full_CONNER_20041104_8 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:04:04Finished backup at 04-NOV-04Starting backup at 04-NOV-04current log archivedusing channel ORA_DISK_1channel ORA_DISK_1: starting archive log backupsetchannel ORA_DISK_1: specifying archive log(s) in backup setinput archive log thread=1 sequence=164 recid=7 stamp=541351832channel ORA_DISK_1: starting piece 1 at 04-NOV-04channel ORA_DISK_1: finished piece 1 at 04-NOV-04piece handle=/opt/oracle/orabak/arch_CONNER_20041104_9 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:02channel ORA_DISK_1: deleting archive log(s)archive log filename=/opt/oracle/oradata/conner/archive/1_164.dbf recid=7 stamp=541351832Finished backup at 04-NOV-04RMAN>

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

 [[email protected] orabak]$ ls -ltotal 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.
http:[email protected][email protected].

原文出处:

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

 

欢迎大家阅读《使用Rman的Plus archvielog选项简化数据_sqlserver,跪求各位点评,若觉得好的话请收藏本文,by 搞代码


喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址