Create Rman Backup scripts from SQL Query
Step 1 - Create Backup scripts from below SQL Query(Edit the Backup location based on your environments) . this will create Rman_backup.rman.rman file
set echo off pages 0 feed off linesize 5000 TRIM on TRIMS on sqlp #
spool /erp_bkp/oradata/rman/tmp/Rman_backup.rman
select 'configure device type disk parallelism 5 backup type to backupset;' from dual;
select 'configure maxsetsize to '||round((max(bytes)/1024/1024) + 200)||'m;' from dba_data_files;
select 'backup as backupset tag ''RapidClone_RAC'' database format ''/erp_bkp/oradata/rman/bkp_sets/stage/%U'';' from dual;
select 'backup as backupset tag ''RapidClone_RAC'' archivelog all format ''/erp_bkp/oradata/rman/bkp_sets/stage/%U'';' from dual;
select 'backup tag ''RapidClone_RAC'' as copy current controlfile format ''/erp_bkp/oradata/rman/bkp_sets/backup_controlfile.ctl'';' from dual;
select 'exit' from dual;
spool off;
exit;
Step 2 - Run the Backup scripts with nohup mode which was created from step 1
nohup rman target / nocatalog @/erp_bkp/oradata/rman/tmp/Rman_backup.rman log=/erp_bkp/oradata/rman/log/rman_backup.log &
Step 1 - Create Backup scripts from below SQL Query(Edit the Backup location based on your environments) . this will create Rman_backup.rman.rman file
set echo off pages 0 feed off linesize 5000 TRIM on TRIMS on sqlp #
spool /erp_bkp/oradata/rman/tmp/Rman_backup.rman
select 'configure device type disk parallelism 5 backup type to backupset;' from dual;
select 'configure maxsetsize to '||round((max(bytes)/1024/1024) + 200)||'m;' from dba_data_files;
select 'backup as backupset tag ''RapidClone_RAC'' database format ''/erp_bkp/oradata/rman/bkp_sets/stage/%U'';' from dual;
select 'backup as backupset tag ''RapidClone_RAC'' archivelog all format ''/erp_bkp/oradata/rman/bkp_sets/stage/%U'';' from dual;
select 'backup tag ''RapidClone_RAC'' as copy current controlfile format ''/erp_bkp/oradata/rman/bkp_sets/backup_controlfile.ctl'';' from dual;
select 'exit' from dual;
spool off;
exit;
Step 2 - Run the Backup scripts with nohup mode which was created from step 1
nohup rman target / nocatalog @/erp_bkp/oradata/rman/tmp/Rman_backup.rman log=/erp_bkp/oradata/rman/log/rman_backup.log &