【RAC,DATAGUARD】Creating a physical standby from ASM (RAC ) primary之四
oracle@rac1:/home/oracle>rman target sys/yang402@rac auxiliary sys/yang402@yangdb
Recovery Manager: Release 11.2.0.1.0 - Production on Thu Sep 15 15:46:58 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: RAC (DBID=2349912968)
connected to auxiliary database: RAC (not mounted)
RMAN> run {
2> allocate channel c1 type disk connect 'sys/yang402@rac';
3> allocate channel c2 type disk connect 'sys/yang402@rac';
4> allocate auxiliary channel s1 type disk ;
5> allocate auxiliary channel s2 type disk ;
6> sql channel c1 "alter system archive log current";
7> duplicate target database for standby from active database
8> spfile
9> set db_name='rac'
10> set db_unique_name='yangdb'
11> set cluster_database='FALSE'
12> set audit_file_dest='/opt/oracle/admin/yangdb/adump'
13> set DIAGNOSTIC_DEST='/opt/oracle'
14> set db_create_file_dest='/opt/oracle/oradata/yangdb'
15> set db_recovery_file_dest='/opt/oracle/flash_recovery_area'
16> set control_files='/opt/oracle/oradata/yangdb/control01.ctl','/opt/oracle/oradata/yangdb/control02.ctl','/opt/oracle/oradata/yangdb/control03.ctl'
17> set undo_tablespace='UNDOTBS1'
18> set service_names='yangdb'
19> set standby_file_management='AUTO'
20> set log_archive_config='DG_CONFIG=(rac,yangdb,alifpre)'
21> set log_archive_dest_1='LOCATION=/opt/oracle/yangdb_arch'
22> set log_archive_dest_2='service=rac ARCH ASYNC valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=rac'
23> set log_archive_dest_state_1='enable'
24> set log_archive_dest_state_2='enable'
25> set log_archive_format='yangdb_%t_%s_%r.log'
26> set remote_login_passwordfile='exclusive'
27> set LOG_FILE_NAME_CONVERT='+DATA1/rac/onlinelog','/opt/oracle/oradata/yangdb','+DATA2/rac/onlinelog','/opt/oracle/oradata/yangdb'
28> set DB_FILE_NAME_CONVERT='+DATA2/rac/datafile','/opt/oracle/oradata/yangdb','+DATA2','/opt/oracle/oradata/yangdb'
29> set remote_listener=''
30> set fal_client='yangdb'
31> set fal_server='rac'
32> NOFILENAMECHECK;
33> sql channel c1 "alter system archive log current";
34> }
using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=48 instance=rac1 device type=DISK
allocated channel: c2
channel c2: SID=52 instance=rac1 device type=DISK
allocated channel: s1
channel s1: SID=19 device type=DISK
allocated channel: s2
channel s2: SID=20 device type=DISK
sql statement: alter system archive log current
Starting Duplicate Db at 15-SEP-11
contents of Memory Script.:
{
backup as copy reuse
targetfile '/opt/rac/oracle/11.2.0/db/dbs/orapwrac2' auxiliary format
'/opt/oracle/11.2.0/alifpre/dbs/orapwyangdb' targetfile
'+DATA2/rac/spfilerac.ora' auxiliary format
'/opt/oracle/11.2.0/alifpre/dbs/spfileyangdb.ora' ;
sql clone "alter system set spfile= ''/opt/oracle/11.2.0/alifpre/dbs/spfileyangdb.ora''";
}
executing Memory Script
Starting backup at 15-SEP-11
Finished backup at 15-SEP-11
sql statement: alter system set spfile= ''/opt/oracle/11.2.0/alifpre/dbs/spfileyangdb.ora''
contents of Memory Script.:
{
sql clone "alter system set db_name = ''rac'' comment='''' scope=spfile";
sql clone "alter system set db_unique_name = ''yangdb'' comment='''' scope=spfile";
sql clone "alter system set cluster_database = FALSE comment='''' scope=spfile";
sql clone "alter system set audit_file_dest = ''/opt/oracle/admin/yangdb/adump'' comment='''' scope=spfile";
sql clone "alter system set DIAGNOSTIC_DEST = ''/opt/oracle'' comment= '''' scope=spfile";
sql clone "alter system set db_create_file_dest = ''/opt/oracle/oradata/yangdb'' comment='''' scope=spfile";
sql clone "alter system set db_recovery_file_dest = ''/opt/oracle/flash_recovery_area'' comment= '''' scope=spfile";
sql clone "alter system set control_files =''/opt/oracle/oradata/yangdb/control01.ctl'', ''/opt/oracle/oradata/yangdb/control02.ctl'', ''/opt/oracle/oradata/yangdb/control03.ctl'' comment= '''' scope=spfile";
sql clone "alter system set undo_tablespace=''UNDOTBS1'' comment='''' scope=spfile";
sql clone "alter system set service_names =''yangdb'' comment='''' scope=spfile";
sql clone "alter system set standby_file_management =''AUTO'' comment='''' scope=spfile";
sql clone "alter system set log_archive_config =''DG_CONFIG=(rac,yangdb,alifpre)'' comment='''' scope=spfile";
sql clone "alter system set log_archive_dest_1 =''LOCATION=/opt/oracle/yangdb_arch'' comment='''' scope=spfile";
sql clone "alter system set log_archive_dest_2 =''service=rac ARCH ASYNC valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=rac'' comment='''' scope=spfile";
sql clone "alter system set log_archive_dest_state_1 =''enable'' comment='''' scope=spfile";
sql clone "alter system set log_archive_dest_state_2 =''enable'' comment='''' scope=spfile";
sql clone "alter system set log_archive_format =''yangdb_%t_%s_%r.log'' comment='''' scope=spfile";
sql clone "alter system set remote_login_passwordfile = ''exclusive'' comment='''' scope=spfile";
sql clone "alter system set LOG_FILE_NAME_CONVERT =''+DATA1/rac/onlinelog'', ''/opt/oracle/oradata/yangdb'', ''+DATA2/rac/onlinelog'', ''/opt/oracle/oradata/yangdb'' comment='''' scope=spfile";
sql clone "alter system set db_file_name_convert =''+DATA2/rac/datafile'', ''/opt/oracle/oradata/yangdb'', ''+DATA2'', ''/opt/oracle/oradata/yangdb'' comment='''' scope=spfile";
sql clone "alter system set remote_listener = '''' comment='''' scope=spfile";
sql clone "alter system set fal_client = ''yangdb'' comment='''' scope=spfile";
sql clone "alter system set fal_server = ''rac'' comment='''' scope=spfile";
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
sql statement: alter system set db_name = ''rac'' comment= '''' scope=spfile
sql statement: alter system set db_unique_name = ''yangdb'' comment= '''' scope=spfile
sql statement: alter system set cluster_database = FALSE comment= '''' scope=spfile
sql statement: alter system set audit_file_dest = ''/opt/oracle/admin/yangdb/adump'' comment= '''' scope=spfile
sql statement: alter system set DIAGNOSTIC_DEST = ''/opt/oracle'' comment= '''' scope=spfile
sql statement: alter system set db_create_file_dest = ''/opt/oracle/oradata/yangdb'' comment= '''' scope=spfile
sql statement: alter system set db_recovery_file_dest = ''/opt/oracle/flash_recovery_area'' comment= '''' scope=spfile
sql statement: alter system set control_files = ''/opt/oracle/oradata/yangdb/control01.ctl'', ''/opt/oracle/oradata/yangdb/control02.ctl'', ''/opt/oracle/oradata/yangdb/control03.ctl'' comment= '''' scope=spfile
sql statement: alter system set undo_tablespace = ''UNDOTBS1'' comment= '''' scope=spfile
sql statement: alter system set service_names = ''yangdb'' comment= '''' scope=spfile
sql statement: alter system set standby_file_management = ''AUTO'' comment= '''' scope=spfile
sql statement: alter system set log_archive_config = ''DG_CONFIG=(rac,yangdb,alifpre)'' comment= '''' scope=spfile
sql statement: alter system set log_archive_dest_1 = ''LOCATION=/opt/oracle/yangdb_arch'' comment= '''' scope=spfile
sql statement: alter system set log_archive_dest_2 = ''service=rac ARCH ASYNC valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=rac'' comment= '''' scope=spfile
sql statement: alter system set log_archive_dest_state_1 = ''enable'' comment= '''' scope=spfile
sql statement: alter system set log_archive_dest_state_2 = ''enable'' comment= '''' scope=spfile
sql statement: alter system set log_archive_format = ''yangdb_%t_%s_%r.log'' comment= '''' scope=spfile
sql statement: alter system set remote_login_passwordfile = ''exclusive'' comment= '''' scope=spfile
sql statement: alter system set LOG_FILE_NAME_CONVERT = ''+DATA1/rac/onlinelog'', ''/opt/oracle/oradata/yangdb'', ''+DATA2/rac/onlinelog'', ''/opt/oracle/oradata/yangdb'' comment= '''' scope=spfile
sql statement: alter system set db_file_name_convert = ''+DATA2/rac/datafile'', ''/opt/oracle/oradata/yangdb'', ''+DATA2'', ''/opt/oracle/oradata/yangdb'' comment= '''' scope=spfile
sql statement: alter system set remote_listener = '''' comment= '''' scope=spfile
sql statement: alter system set fal_client = ''yangdb'' comment= '''' scope=spfile
sql statement: alter system set fal_server = ''rac'' comment= '''' scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 1469792256 bytes
Fixed Size 2213456 bytes
Variable Size 872417712 bytes
Database Buffers 587202560 bytes
Redo Buffers 7958528 bytes
allocated channel: s1
channel s1: SID=19 device type=DISK
allocated channel: s2
channel s2: SID=20 device type=DISK
contents of Memory Script.:
{
backup as copy current controlfile for standby auxiliary format '/opt/oracle/oradata/yangdb/control01.ctl';
restore clone controlfile to '/opt/oracle/oradata/yangdb/control02.ctl' from
'/opt/oracle/oradata/yangdb/control01.ctl';
restore clone controlfile to '/opt/oracle/oradata/yangdb/control03.ctl' from
'/opt/oracle/oradata/yangdb/control01.ctl';
}
executing Memory Script
Starting backup at 15-SEP-11
channel c1: starting datafile copy
copying standby control file
output file name=/opt/rac/oracle/11.2.0/db/dbs/snapcf_rac1.f tag=TAG20110915T154731 RECID=1 STAMP=761932052
channel c1: datafile copy complete, elapsed time: 00:00:03
Finished backup at 15-SEP-11
Starting restore at 15-SEP-11
channel s2: skipped, AUTOBACKUP already found
channel s1: copied control file copy
Finished restore at 15-SEP-11
Starting restore at 15-SEP-11
channel s2: skipped, AUTOBACKUP already found
channel s1: copied control file copy
Finished restore at 15-SEP-11
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 "/opt/oracle/oradata/yangdb/rac/tempfile/temp.268.761930967";
switch clone tempfile all;
set newname for datafile 1 to "/opt/oracle/oradata/yangdb/system.261.761930837";
set newname for datafile 2 to "/opt/oracle/oradata/yangdb/sysaux.265.761930837";
set newname for datafile 3 to "/opt/oracle/oradata/yangdb/undotbs1.264.761930837";
set newname for datafile 4 to "/opt/oracle/oradata/yangdb/users.263.761930837";
set newname for datafile 5 to "/opt/oracle/oradata/yangdb/undotbs2.269.761931099";
backup as copy reuse
datafile 1 auxiliary format "/opt/oracle/oradata/yangdb/system.261.761930837"
datafile 2 auxiliary format "/opt/oracle/oradata/yangdb/sysaux.265.761930837"
datafile 3 auxiliary format "/opt/oracle/oradata/yangdb/undotbs1.264.761930837"
datafile 4 auxiliary format "/opt/oracle/oradata/yangdb/users.263.761930837"
datafile 5 auxiliary format "/opt/oracle/oradata/yangdb/undotbs2.269.761931099";
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /opt/oracle/oradata/yangdb/rac/tempfile/temp.268.761930967 in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 15-SEP-11
channel c1: starting datafile copy
input datafile file number=00001 name=+DATA2/rac/datafile/system.261.761930837
channel c2: starting datafile copy
input datafile file number=00002 name=+DATA2/rac/datafile/sysaux.265.761930837
output file name=/opt/oracle/oradata/yangdb/sysaux.265.761930837 tag=TAG20110915T154757
channel c2: datafile copy complete, elapsed time: 00:00:25
channel c2: starting datafile copy
input datafile file number=00003 name=+DATA2/rac/datafile/undotbs1.264.761930837
output file name=/opt/oracle/oradata/yangdb/system.261.761930837 tag=TAG20110915T154757
channel c1: datafile copy complete, elapsed time: 00:00:33
channel c1: starting datafile copy
input datafile file number=00005 name=+DATA2/rac/datafile/undotbs2.269.761931099
output file name=/opt/oracle/oradata/yangdb/undotbs1.264.761930837 tag=TAG20110915T154757
channel c2: datafile copy complete, elapsed time: 00:00:07
channel c2: starting datafile copy
input datafile file number=00004 name=+DATA2/rac/datafile/users.263.761930837
output file name=/opt/oracle/oradata/yangdb/undotbs2.269.761931099 tag=TAG20110915T154757
channel c1: datafile copy complete, elapsed time: 00:00:01
output file name=/opt/oracle/oradata/yangdb/users.263.761930837 tag=TAG20110915T154757
channel c2: datafile copy complete, elapsed time: 00:00:01
Finished backup at 15-SEP-11
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=1 STAMP=761932121 file name=/opt/oracle/oradata/yangdb/system.261.761930837
datafile 2 switched to datafile copy
input datafile copy RECID=2 STAMP=761932121 file name=/opt/oracle/oradata/yangdb/sysaux.265.761930837
datafile 3 switched to datafile copy
input datafile copy RECID=3 STAMP=761932121 file name=/opt/oracle/oradata/yangdb/undotbs1.264.761930837
datafile 4 switched to datafile copy
input datafile copy RECID=4 STAMP=761932121 file name=/opt/oracle/oradata/yangdb/users.263.761930837
datafile 5 switched to datafile copy
input datafile copy RECID=5 STAMP=761932121 file name=/opt/oracle/oradata/yangdb/undotbs2.269.761931099
Finished Duplicate Db at 15-SEP-11
sql statement: alter system archive log current
released channel: c1
released channel: c2
released channel: s1
released channel: s2
RMAN> exit
Recovery Manager complete.
oracle@rac1:/home/oracle>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22664653/viewspace-707817/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【RAC】Creating a filesystem physical standby from ASM (RAC ) primary之三ASM
- 【RAC】Creating a filesystem physical standby from ASM (RAC ) primary 之二ASM
- 【RAC】Creating a filesystem physical standby from ASM (RAC ) primary之一ASM
- Creating a physical standby from ASM primaryASM
- Creating a physical standby from ASM primary [ID 787793.1]ASM
- 配置 Oracle 10g RAC primary + RAC physical standby dataguardOracle 10g
- Create RAC Standby Database for RAC Primary DatabaseDatabase
- Configure Oracle Dataguard Primary-ASM to Physical-ASM薦OracleASM
- RAC+ASM+DATAGUARDASM
- 配置 Oracle 10g RAC primary + RAC logical standbyOracle 10g
- Creating a Physical Standby using RMAN DUPLICATE FROM ACTIVE DATABASEDatabase
- RMAN Duplicate Database From RAC ASM To RAC ASM [ID 461479.1]DatabaseASM
- rac庫與單機physical standby 之間的switchover
- DataGuard:Physical Standby Switchover
- Creating a Physical Standby DatabaseDatabase
- Creating Physical Standby using RMAN Duplicate Without Shutting Primary_789370.1
- DataGuard:Physical Standby FailoverAI
- Creating Physical Standby using RMAN Duplicate Without Shutting down The Primary [ID 789370.1]
- Step By Step Guide On Creating Physical Standby Using RMAN Duplicate In ASM Filesystem For ASM PrimaGUIIDEASM
- 11g rac standby asm---04ASM
- Step-By-Step Guide To Create Physical Standby On Normal File System For ASM Primary using RMANGUIIDEORMASM
- RAC資料庫建立STANDBY(四)資料庫
- RAC DG 物理standby ASM無法啟動ASM
- Step by Step Guide on Creating Physical Standby Using RMAN DUPLICATE...FROM ACTIVE DATABASE WithoutGUIIDEDatabase
- 【DataGuard】Oracle 11g physical standby switchoverOracle
- How To Upgrade ASM from 10.2 to 11.1 (RAC)ASM
- oracle rac + dataguardOracle
- Oracle 11.2 DataGuard RAC To RAC搭建Oracle
- ORACLE10g DataGuard 配置Physical Standby DatabaseOracleDatabase
- 關於建立DataGuard Physical Standby資料庫資料庫
- 【DATAGUARD 學習】監控primary庫和standby庫
- 主庫RAC,備庫單節點ASM的dataguard搭建ASM
- [WK-T]ORACLE RAC +ASM Backup and Recovery(四)OracleASM
- 邏輯 rac standby和物理 rac standby的switchover 和 failoverAI
- 單例項Primary快速搭建Standby RAC參考手冊(19.16 ADG)單例
- 搭建Physical ADG 11.2.0.3 for RAC
- goldengate + asm + racGoASM
- Rename a Datafile in Primary Within in Physical Dataguard Configuration_733796.1