;
alter system set fal_server=pri scope=spfile;
alter system set fal_client=sty scope=spfile;
SQL> shutdown abort;
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 1188511744 bytes
Fixed Size 1364228 bytes
Variable Size 754978556 bytes
Database Buffers 419430400 bytes
Redo Buffers 12738560 bytes
SQL>
SQL>
?5、在primary端通过Rman Duplicate创建备库,在db01上执行如下命令
rman target sys/oracle@pri auxiliary sys/oracle@sty nocatalog
?duplicate target database for standby from active database nofilenamecheck;
?[oracle@db01 ~]$ rman target sys/oracle@pri auxiliary sys/oracle@sty nocatalog
?Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jun 17 22:33:54 2015
?Copyright (c) 1982, 2011, Oracle and/or its affiliates.? All rights reserved.
?connected to target database: WOO (DBID=4221729487)
?using target database control file instead of recovery catalog
?connected to auxiliary database: WOO (not mounted)
?RMAN>
?RMAN> duplicate target database for standby from active database nofilenamecheck;
?Starting Duplicate Db at 17-JUN-15
?allocated channel: ORA_AUX_DISK_1
?channel ORA_AUX_DISK_1: SID=19 device type=DISK
?contents of Memory Script:
?{
? ? backup as copy reuse
? ? targetfile? '/DBSoft/oracle/product/11.2.4/dbhome_1/dbs/orapwwoo' auxiliary format
? '/DBSoft/oracle/product/11.2.4/dbhome_1/dbs/orapwwoo'? ;
?}
?executing Memory Script
?Starting backup at 17-JUN-15
?allocated channel: ORA_DISK_1
?channel ORA_DISK_1: SID=44 device type=DISK
?Finished backup at 17-JUN-15
?contents of Memory Script:
?{
? ? backup as copy current controlfile for standby auxiliary format? '/DBSoft/oracle/oradata/woo/control01.ctl';
? ? restore clone controlfile to? '/DBSoft/oracle/fast_recovery_area/woo/control02.ctl' from
? '/DBSoft/oracle/oradata/woo/control01.ctl';
?}
?executing Memory Script
?Starting backup at 17-JUN-15
?using channel ORA_DISK_1
?channel ORA_DISK_1: starting datafile copy
?copying standby control file
?output file name=/DBSoft/oracle/product/11.2.4/dbhome_1/dbs/snapcf_woo.f tag=TAG20150617T223502 RECID=1 STAMP=882657308
?channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
?Finished backup at 17-JUN-15
?Starting restore at 17-JUN-15
?using channel ORA_AUX_DISK_1
?channel ORA_AUX_DISK_1: copied control file copy
?Finished restore at 17-JUN-15
?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
? "/DBSoft/oracle/oradata/woo/temp01.dbf";
? ? switch clone tempfile all;
? ? set newname for datafile? 1 to
? "/DBSoft/oracle/oradata/woo/system01.dbf";
? ? set newname for datafile? 2 to
? "/DBSoft/oracle/oradata/woo/sysaux01.dbf";
? ? set newname for datafile? 3 to
? "/DBSoft/oracle/oradata/woo/undotbs01.dbf";
? ? set newname for datafile? 4 to
? "/DBSoft/oracle/oradata/woo/users01.dbf";
? ? backup as copy reuse
? ? datafile? 1 auxiliary format
? "/DBSoft/oracle/oradata/woo/system01.dbf"? datafile
? 2 auxiliary format
? "/DBSoft/oracle/oradata/woo/sysaux01.dbf"? datafile
? 3 auxiliary format
? "/DBSoft/oracle/oradata/woo/undotbs01.dbf"? datafile
? 4 auxiliary format
? "/DBSoft/oracle/oradata/woo/users01.dbf"? ;
? ? sql 'alter system archive log current';
?}
?executing Memory Script
?executing command: SET NEWNAME
?renamed tempfi