[root@primary ~]# cat dup.sh
rman target sys/oracle@orcl auxiliary sys/oracle@standby <<EOF
run{
allocate channel ch1 device type disk rate 20m;
allocate channel ch2 device type disk rate 20m;
allocate channel ch3 device type disk;
allocate channel ch4 device type disk;
allocate auxiliary channel stby device type disk rate 20m;
set newname for tempfile 1 to '/oradata/dg/tempfile/temp.dbf';
set newname for tempfile 2 to '/oradata/dg/tempfile/temporary_data.dbf'
duplicate target database for standby from active database nofilenamecheck;
}
EOF
[root@primary ~]#
rman target sys/oracle@orcl auxiliary sys/oracle@standby <<EOF
run{
allocate channel ch1 device type disk rate 20m;
allocate channel ch2 device type disk rate 20m;
allocate channel ch3 device type disk;
allocate channel ch4 device type disk;
allocate auxiliary channel stby device type disk rate 20m;
set newname for tempfile 1 to '/oradata/dg/tempfile/temp.dbf';
set newname for tempfile 2 to '/oradata/dg/tempfile/temporary_data.dbf'
duplicate target database for standby from active database nofilenamecheck;
}
EOF
[root@primary ~]#
nohup ./dup.sh &