connect 'internal/manager@scdb1';
sql 'alter system archive log current';
backup
format 'arch_t%t_s%s_p%p'
(archivelog
like '/jfbackup/arch_log/arch_1_%.arc'
delete input);
release channel d1;
}
run {
allocate channel d2 type 'sbt_tape' parms
ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)'
connect 'internal/manager@scdb2';
sql 'alter system archive log current';
backup
format 'arch_t%t_s%s_p%p'
(archivelog
like '/jfbackup/arch_log/arch_2_%.arc'
delete input);
release channel d2;
}
同时还可以对指定的tablespace datafile进行备份,具体请参见RMAN相关手册。
手工执行ORACLE的备份:
rman target internal/oracle@targetSID rcvcat rman/rman@recoverycatalogSID cmdfile=/xxx/xxx msglog=xxx.log
八、 ORACLE数据库的恢复
run {
allocate channel d3 type 'sbt_tape' connect 'internal/manager@scdb1' parms
'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
allocate channel d4 type 'sbt_tape' connect 'internal/manager@scdb2' parms
'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
restore controlfile;
alter database mount;
restore database;
recover database;
release channel d1;
release channel d2;
sql "alter database open resetlogs";
}
阅读(878) | 评论(0) | 转发(0) |