configure controlfile autobackup on;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
上面是调整备份策略,下面是备份脚本
run
{
allocate channel t1 type 'sbt_tape'
parms 'ENV=(NSR_DATA_VOLUME_POOL=Default,NSR_SERVER=gbxdxbjl,NSR_CLIENT=xdx_bjl)';
backup full database filesperset 1
format 'full_%d_%u';
sql 'alter system archive log current';
backup archivelog all
format 'arch_%t_%s_%p'
#skip inaccessible
#delete input;
Backup archivelog all delete input until time 'sysdate-7';
release channel t1;
allocate channel d1 type disk;
copy current controlfile to '/data2/oradata/ctlbak/ctl.bak';
sql 'create pfile='/sandata/cs_test/testg1/test_back/init.ora' from spfile' ;
release channel d1;
}
我其实想把SPfile当为普通文件去备份,不过不知道怎样写就写了一个SQL语句上去,请问还有什么地方需要完善呢?谢谢~!
|