[oracle@stby ~]$ ssh rac1
oracle@rac1's password:
Last login: Tue Apr 8 09:49:46 2014 from stby.kr.oracle.com
[oracle@rac1 ~]$ rman target sys/oracle@orcl1 auxiliary sys/oracle@stby
Recovery Manager: Release 11.2.0.4.0 - Production on Fri Apr 4 06:49:26 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1370982891)
connected to auxiliary database: STBY (not mounted)
RMAN>
run {
duplicate target database for standby from active database
spfile
parameter_value_convert 'orcl','stby'
set db_unique_name='stby'
set cluster_database='false'
set control_files='/u01/app/oradata/stby/control01.ctl', '/u01/app/oradata/stby/control02.ctl'
set db_recovery_file_dest='/u01/app/oradata/stby'
set db_create_file_dest='/u01/app/oradata/stby/'
set db_file_name_convert='+DATA/orcl/datafile/','/u01/app/oradata/stby/', '+DATA/orcl/tempfile/', '/u01/app/oradata/stby/'
set log_file_name_convert='+DATA/orcl/onlinelog/','/u01/app/oradata/stby/'
set log_archive_max_processes='5'
set standby_file_management='AUTO'
nofilenamecheck
;
}
Starting Duplicate Db at 08-APR-14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 device type=DISK
contents of Memory Script:
{
backup as copy reuse
targetfile '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapworcl1' auxiliary format
'/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwstby' targetfile
'+DATA/orcl/spfileorcl.ora' auxiliary format
'/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilestby.ora' ;
sql clone "alter system set spfile= ''/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilestby.ora''";
}
executing Memory Script
Starting backup at 08-APR-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=66 instance=orcl1 device type=DISK
Finished backup at 08-APR-14
sql statement: alter system set spfile= ''/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilestby.ora''
contents of Memory Script:
{
sql clone "alter system set audit_file_dest =
''/u01/app/oracle/admin/stby/adump'' comment=
'''' scope=spfile";
sql clone "alter system set dispatchers =
''(PROTOCOL=TCP) (SERVICE=stbyXDB)'' comment=
'''' scope=spfile";
sql clone "alter system set db_unique_name =
''stby'' comment=
'''' scope=spfile";
sql clone "alter system set cluster_database =
false comment=
'''' scope=spfile";
sql clone "alter system set control_files =
''/u01/app/oradata/stby/control01.ctl'', ''/u01/app/oradata/stby/control02.ctl'' comment=
'''' scope=spfile";
sql clone "alter system set db_recovery_file_dest =
''/u01/app/oradata/stby'' comment=
'''' scope=spfile";
sql clone "alter system set db_create_file_dest =
''/u01/app/oradata/stby/'' comment=
'''' scope=spfile";
sql clone "alter system set db_file_name_convert =
''+DATA/orcl/datafile/'', ''/u01/app/oradata/stby/'', ''+DATA/orcl/tempfile/'', ''/u01/app/oradata/stby/ '' comment=
'''' scope=spfile";
sql clone "alter system set log_file_name_convert =
''+DATA/orcl/onlinelog/'', ''/u01/app/oradata/stby/'' comment=
'''' scope=spfile";
sql clone "alter system set log_archive_max_processes =
5 comment=
'''' scope=spfile";
sql clone "alter system set standby_file_management =
''AUTO'' comment=
'''' scope=spfile";
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
sql statement: alter system set audit_file_dest = ''/u01/app/oracle/admin/stby/adump'' comment= '''' sc ope=spfile
sql statement: alter system set dispatchers = ''(PROTOCOL=TCP) (SERVICE=stbyXDB)'' comment= '''' scope= spfile
sql statement: alter system set db_unique_name = ''stby'' comment= '''' scope=spfile
sql statement: alter system set cluster_database = false comment= '''' scope=spfile
sql statement: alter system set control_files = ''/u01/app/oradata/stby/control01.ctl'', ''/u01/app/ora data/stby/control02.ctl'' comment= '''' scope=spfile
sql statement: alter system set db_recovery_file_dest = ''/u01/app/oradata/stby'' comment= '''' scope=s pfile
sql statement: alter system set db_create_file_dest = ''/u01/app/oradata/stby/'' comment= '''' scope=sp file
sql statement: alter system set db_file_name_convert = ''+DATA/orcl/datafile/'', ''/u01/app/oradata/stb y/'', ''+DATA/orcl/tempfile/'', ''/u01/app/oradata/stby/'' comment= '''' scope=spfile
sql statement: alter system set log_file_name_convert = ''+DATA/orcl/onlinelog/'', ''/u01/app/oradata/s tby/'' comment= '''' scope=spfile
sql statement: alter system set log_archive_max_processes = 5 comment= '''' scope=spfile
sql statement: alter system set standby_file_management = ''AUTO'' comment= '''' scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 626327552 bytes
Fixed Size 2255832 bytes
Variable Size 234882088 bytes
Database Buffers 385875968 bytes
Redo Buffers 3313664 bytes
contents of Memory Script:
{
backup as copy current controlfile for standby auxiliary format '/u01/app/oradata/stby/control01.ctl' ;
restore clone controlfile to '/u01/app/oradata/stby/control02.ctl' from
'/u01/app/oradata/stby/control01.ctl';
}
executing Memory Script
Starting backup at 08-APR-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_orcl1.f tag=TAG20140408T095028 RECID= 2 STAMP=844336233
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 08-APR-14
Starting restore at 08-APR-14
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=19 device type=DISK
channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 08-APR-14
contents of Memory Script:
{
sql clone 'alter database mount standby database';
}
executing Memory Script
sql statement: alter database mount standby database
contents of Memory Script:
{
set newname for tempfile 1 to
"/u01/app/oradata/stby/temp.266.843202209";
switch clone tempfile all;
set newname for datafile 1 to
"/u01/app/oradata/stby/system.256.843201987";
set newname for datafile 2 to
"/u01/app/oradata/stby/sysaux.257.843201987";
set newname for datafile 3 to
"/u01/app/oradata/stby/undotbs1.258.843201989";
set newname for datafile 4 to
"/u01/app/oradata/stby/users.259.843201989";
set newname for datafile 5 to
"/u01/app/oradata/stby/example.267.843202225";
set newname for datafile 6 to
"/u01/app/oradata/stby/undotbs2.268.843202725";
backup as copy reuse
datafile 1 auxiliary format
"/u01/app/oradata/stby/system.256.843201987" datafile
2 auxiliary format
"/u01/app/oradata/stby/sysaux.257.843201987" datafile
3 auxiliary format
"/u01/app/oradata/stby/undotbs1.258.843201989" datafile
4 auxiliary format
"/u01/app/oradata/stby/users.259.843201989" datafile
5 auxiliary format
"/u01/app/oradata/stby/example.267.843202225" datafile
6 auxiliary format
"/u01/app/oradata/stby/undotbs2.268.843202725" ;
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /u01/app/oradata/stby/temp.266.843202209 in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 08-APR-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+DATA/orcl/datafile/system.256.843201987
output file name=/u01/app/oradata/stby/system.256.843201987 tag=TAG20140408T095048
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.257.843201987
output file name=/u01/app/oradata/stby/sysaux.257.843201987 tag=TAG20140408T095048
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=+DATA/orcl/datafile/example.267.843202225
output file name=/u01/app/oradata/stby/example.267.843202225 tag=TAG20140408T095048
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.258.843201989
output file name=/u01/app/oradata/stby/undotbs1.258.843201989 tag=TAG20140408T095048
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=+DATA/orcl/datafile/undotbs2.268.843202725
output file name=/u01/app/oradata/stby/undotbs2.268.843202725 tag=TAG20140408T095048
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=+DATA/orcl/datafile/users.259.843201989
output file name=/u01/app/oradata/stby/users.259.843201989 tag=TAG20140408T095048
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 08-APR-14
sql statement: alter system archive log current
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
datafile 1 switched to datafile copy
input datafile copy RECID=2 STAMP=844304122 file name=/u01/app/oradata/stby/system.256.843201987
datafile 2 switched to datafile copy
input datafile copy RECID=3 STAMP=844304122 file name=/u01/app/oradata/stby/sysaux.257.843201987
datafile 3 switched to datafile copy
input datafile copy RECID=4 STAMP=844304122 file name=/u01/app/oradata/stby/undotbs1.258.843201989
datafile 4 switched to datafile copy
input datafile copy RECID=5 STAMP=844304122 file name=/u01/app/oradata/stby/users.259.843201989
datafile 5 switched to datafile copy
input datafile copy RECID=6 STAMP=844304122 file name=/u01/app/oradata/stby/example.267.843202225
datafile 6 switched to datafile copy
input datafile copy RECID=7 STAMP=844304122 file name=/u01/app/oradata/stby/undotbs2.268.843202725
Finished Duplicate Db at 08-APR-14
RMAN> EXIT
Recovery Manager complete.
|