TSM ORACLE 備份排程

westzq1984發表於2009-05-28

/home/oracle9/scfull_bk.rman

run
{allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin/tdpo.opt)';
backup format '%d_full_%t_%s_%p' database;
sql 'alter system archive log current';
backup format '%d_arch_%t_%s_%p' archivelog all delete input;
release channel t1;
}


/home/oracle9/scfull_bk.sh

#!/usr/bin/ksh
export NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS
export ORACLE_HOME=/u01/oracle9/app/oracle/product/9.2.0/db_1
export ORACLE_HOME=SOURCE9
PATH=$ORACLE_HOME/bin:$PATH;export PATH
su oracle -c "rman target sys/sys cmdfile /home/oracle9/scfull_bk.rman msglog /home/oracle9/rman.log"

dsmadmc註冊排程TSM>
def sched standard daily_scfullbk_oracle desc="Daily Online ora9i full Backup" action=command bjects="/home/oracle9/scfull_bk.sh" starttime=00:05 duration=15 duru=minutes period=1 perunits=day dayofweek=any
TSM>define association standard daily_scfullbk_oracle WESTZQ

使用console的 Schedule Configuration可以很方便的配置

啟動排程
nohup dsmc schedule -password=admin > /dev/null &

 


 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8242091/viewspace-604377/,如需轉載,請註明出處,否則將追究法律責任。

相關文章