RMAN
Duplication shell script
rman_bkup.ksh
#!/bin/ksh
export
ORACLE_SID=ORCLTEST
export
ORACLE_HOME=/applications/oracle/12.1.0.2
export
ORACLE_BASE=/applications/oracle
rman
auxiliary / catalog rman/rman@RMANCATDB msglog
/home/oracle/cloning/rman_cloning.log cmdfile=/home/oracle/rman/rman_cloning.cmd
$ cat rman_cloning.cmd
RUN
{
ALLOCATE
AUXILIARY CHANNEL CH1 TYPE 'SBT_TAPE' PARMS
'ENV=(NSR_SERVER=FFBKPSAMIK,NSR_CLIENT=FFTPDCAMIT,NSR_DATA_VOLUME_POOL=DATA)';
ALLOCATE
AUXILIARY CHANNEL CH2 TYPE 'SBT_TAPE' PARMS
'ENV=(NSR_SERVER=FFBKPSAMIK,NSR_CLIENT=FFTPDCAMIT,NSR_DATA_VOLUME_POOL=DATA)';
ALLOCATE
AUXILIARY CHANNEL CH3 TYPE 'SBT_TAPE' PARMS 'ENV=(NSR_SERVER=FFBKPSAMIK,NSR_CLIENT=FFTPDCAMIT,NSR_DATA_VOLUME_POOL=DATA)';
ALLOCATE
AUXILIARY CHANNEL CH4 TYPE 'SBT_TAPE' PARMS
'ENV=(NSR_SERVER=FFBKPSAMIK,NSR_CLIENT=FFTPDCAMIT,NSR_DATA_VOLUME_POOL=DATA)';
ALLOCATE
AUXILIARY CHANNEL CH5 TYPE 'SBT_TAPE' PARMS 'ENV=(NSR_SERVER=FFBKPSAMIK,NSR_CLIENT=FFTPDCAMIT,NSR_DATA_VOLUME_POOL=DATA)';
ALLOCATE
AUXILIARY CHANNEL CH6 TYPE 'SBT_TAPE' PARMS
'ENV=(NSR_SERVER=FFBKPSAMIK,NSR_CLIENT=FFTPDCAMIT,NSR_DATA_VOLUME_POOL=DATA)';
ALLOCATE
AUXILIARY CHANNEL CH7 TYPE 'SBT_TAPE' PARMS 'ENV=(NSR_SERVER=FFBKPSAMIK,NSR_CLIENT=FFTPDCAMIT,NSR_DATA_VOLUME_POOL=DATA)';
ALLOCATE
AUXILIARY CHANNEL CH8 TYPE 'SBT_TAPE' PARMS
'ENV=(NSR_SERVER=FFBKPSAMIK,NSR_CLIENT=FFTPDCAMIT,NSR_DATA_VOLUME_POOL=DATA)';
ALLOCATE
AUXILIARY CHANNEL CH9 TYPE 'SBT_TAPE' PARMS 'ENV=(NSR_SERVER=FFBKPSAMIK,NSR_CLIENT=FFTPDCAMIT,NSR_DATA_VOLUME_POOL=DATA)';
ALLOCATE
AUXILIARY CHANNEL CH10 TYPE 'SBT_TAPE' PARMS
'ENV=(NSR_SERVER=FFBKPSAMIK,NSR_CLIENT=FFTPDCAMIT,NSR_DATA_VOLUME_POOL=DATA)';
ALLOCATE
AUXILIARY CHANNEL CH11 TYPE 'SBT_TAPE' PARMS
'ENV=(NSR_SERVER=FFBKPSAMIK,NSR_CLIENT=FFTPDCAMIT,NSR_DATA_VOLUME_POOL=DATA)';
ALLOCATE
AUXILIARY CHANNEL CH12 TYPE 'SBT_TAPE' PARMS
'ENV=(NSR_SERVER=FFBKPSAMIK,NSR_CLIENT=FFTPDCAMIT,NSR_DATA_VOLUME_POOL=DATA)';
ALLOCATE
AUXILIARY CHANNEL CH13 TYPE 'SBT_TAPE' PARMS
'ENV=(NSR_SERVER=FFBKPSAMIK,NSR_CLIENT=FFTPDCAMIT,NSR_DATA_VOLUME_POOL=DATA)';
ALLOCATE
AUXILIARY CHANNEL CH14 TYPE 'SBT_TAPE' PARMS
'ENV=(NSR_SERVER=FFBKPSAMIK,NSR_CLIENT=FFTPDCAMIT,NSR_DATA_VOLUME_POOL=DATA)';
ALLOCATE
AUXILIARY CHANNEL CH15 TYPE 'SBT_TAPE' PARMS
'ENV=(NSR_SERVER=FFBKPSAMIK,NSR_CLIENT=FFTPDCAMIT,NSR_DATA_VOLUME_POOL=DATA)';
duplicate
database ORCLPROD dbid 1567872362 to ORCLTEST UNTIL TIME
"TO_DATE('25/01/2019 21:30:00','DD/MM/YYYY HH24:MI:SS')"
SPFILE
parameter_value_convert
'ORCLPROD','ORCLTEST'
set
db_name='ORCLTEST'
set
db_unique_name='ORCLTEST'
set
db_file_name_convert='/ORACLE/ORCLPROD/DATA1/','/ORACLE/ORCLTEST/DATA1/','/ORACLE/ORCLPROD/base/','/ORACLE/ORCLTEST/base/'
set
log_file_name_convert='/ORACLE/ORCLPROD/REDO/','/ORACLE/ORCLTEST/REDO/','/ORACLE/ORCLPROD/mirrorlog/','/ORACLE/ORCLTEST/mirrorlog/'
NOFILENAMECHECK;
release
channel CH1;
release
channel CH2;
release
channel CH3;
release
channel CH4;
release
channel CH5;
release
channel CH6;
release
channel CH7;
release
channel CH8;
release
channel CH9;
release
channel CH10;
release
channel CH11;
release
channel CH12;
release
channel CH13;
release
channel CH14;
release
channel CH15;
}
No comments:
Post a Comment