欢迎来到天天文库
浏览记录
ID:9848418
大小:100.50 KB
页数:12页
时间:2018-05-12
《nbu oracle rac恢复备份恢复测试》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、附件一、Oracle备份测试脚本1、RACOracle备份脚本(对nbu模板作出修改的部分已红色标识)#!/bin/sh#$Header:hot_database_backup.sh,v1.22002/08/0623:51:42$##bcpyrght#***************************************************************************#*$VRTScprght:Copyright1993-2007SymantecCorporation,AllRightsReserved$*#*
2、**************************************************************************#ecpyrght##---------------------------------------------------------------------------#hot_database_backup.sh#---------------------------------------------------------------------------#Thisscriptuses
3、RecoveryManagertotakeahot(inconsistent)database#backup.Ahotbackupisinconsistentbecauseportionsofthedatabaseare#beingmodifiedandwrittentothediskwhilethebackupisprogressing.#YoumustrunyourdatabaseinARCHIVELOGmodetomakehotbackups.Itis#assumedthatthisscriptwillbeexecutedbyuserr
4、oot.InorderforRMAN#toworkproperlyweswitchuser(su-)totheoracledbaaccountbefore#execution.IfthisscriptrunsunderauseraccountthathasOracledba#privilege,itwillbeexecutedusingthisuser'saccount.#---------------------------------------------------------------------------#----------
5、-----------------------------------------------------------------#Determinetheuserwhichisexecutingthisscript.#---------------------------------------------------------------------------CUSER=`id
6、cut-d"("-f2
7、cut-d")"-f1`#------------------------------------------------------
8、---------------------#Putoutputin.out.Changeasdesired.#Note:outputdirectoryrequireswritepermission.#---------------------------------------------------------------------------RMAN_LOG_FILE=${0}.out#--------------------------------------------------------------
9、-------------#Youmaywanttodeletetheoutputfilesothatbackupinformationdoes#notaccumulate.Ifnot,deletethefollowinglines.#---------------------------------------------------------------------------if[-f"$RMAN_LOG_FILE"]thenrm-f"$RMAN_LOG_FILE"fi#--------------------------------
10、---------------------------------#Initializethelogfile.#--------------------------
此文档下载收益归作者所有