export ORACLE_SID=BZPROD1
rman msglog /home/oracle/work/adg_setup.log << EOF
connect target sys/xxxxxx@BZPRODRPI
connect auxiliary sys/xxxxx@BZPRODDG
run {
allocate channel ch001 type disk;
allocate channel ch002 type disk;
allocate channel ch003 type disk;
allocate channel ch004 type disk;
allocate channel ch006 type disk;
allocate channel ch007 type disk;
allocate channel ch008 type disk;
allocate auxiliary channel ch005 type disk;
duplicate target database for standby from active database NOFILENAMECHECK
spfile
set db_unique_name 'BZPRODC'
set db_create_file_dest '+DATA'
set standby_file_management 'AUTO'
set remote_listener 'dehetudb-scan:1521'
set log_archive_dest_2 ''
set log_archive_dest_state_2 'DEFER'
set fal_server 'BZPROD1','BZPROD2'
set fal_client 'BZPRODC'
set control_files='+DATA/BZPRODC/CONTROLFILE/ctrl1','+DATA/BZPRODC/CONTROLFILE/ctrl2'
set audit_file_dest '/oracle/app/oracle/admin/BZPRODC/adump'
;
release channel ch001;
release channel ch002;
release channel ch003;
release channel ch004;
release channel ch005;
release channel ch006;
release channel ch007;
release channel ch008;
}
EOF
adg_setup.sh
未经允许不得转载:徐万新之路 » adg_setup.sh