Amazon books

Wednesday, March 12, 2014

Script Backup database using RMAN in Oracle 8i

This is my last example:

run {
     allocate channel c1 type disk format '/migra_UOL/APPRD/%d_APPRD_BKP_12_MAR_2014_%u_%s_%p';
     set limit channel c1 kbytes = 20000000;
     allocate channel c2 type disk format '/migra_UOL/APPRD/%d_APPRD_BKP_12_MAR_2014_%u_%s_%p';
     set limit channel c2 kbytes = 20000000;
     allocate channel c3 type disk format '/migra_UOL/APPRD/%d_APPRD_BKP_12_MAR_2014_%u_%s_%p';
     set limit channel c3 kbytes = 20000000;
     allocate channel c4 type disk format '/migra_UOL/APPRD/%d_APPRD_BKP_12_MAR_2014_%u_%s_%p';
     set limit channel c4 kbytes = 20000000;
     allocate channel c5 type disk format '/migra_UOL/APPRD/%d_APPRD_BKP_12_MAR_2014_%u_%s_%p';
     set limit channel c5 kbytes = 20000000;
     allocate channel c6 type disk format '/migra_UOL/APPRD/%d_APPRD_BKP_12_MAR_2014_%u_%s_%p';
     set limit channel c6 kbytes = 20000000;
     backup current controlfile format '/migra_UOL/APPRD/ctl_for_APPRD_antes.ctl';
     backup database include current controlfile tag = 'Backup_APPRD_12_Mar_2014';
     backup current controlfile format '/migra_UOL/APPRD/ctl_for_APPRD_depois.ctl';
     allocate channel ch1 type disk format '/migra_UOL/APPRD/%d_ARCH_%u_%s_%p';
     backup archivelog all;
}

PS: I used kbytes to set a maximum file size so I could move these files while backup is still running without going out of space.


Best Regards,
Paulo Portugal

No comments:

Post a Comment