Performing duplicate database with ASM/OMF/RMAN (Doc ID 340848.1)
In this Document
Purpose |
Scope |
Details |
Applies to:
Oracle Server - Enterprise Edition - Version 10.1.0.2 and laterInformation in this document applies to any platform.
**Checked for relevance on 26-Mar-2012***
Purpose
This article will illustrate how to duplicate ASM/OMF-based databases using RMAN.
Scope
The procedures for 10.1.0.4 and earlier, as well as 10.1.0.5 slightly vary, thus both are shown.
Details
For details on the 10.1.0.4 RMAN duplicate command see the Refer to Backup and Recovery Reference manual.
Procedure for 10.1.0.4.0 and earlier databases
================================
1) Copy primary database init.ora to auxiliary instance init.ora
2) Modify auxiliary instance init.ora accordingly:
a) If not using OMF for control files, set the CONTROL_FILES parameter to the appropriate location.
Otherwise, do not set this parameter.
b) Do not set the DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT in the auxiliary init.ora
c) Set the DB_CREATE_FILE_DEST initialization parameter to the desired OMF storage location, e.g.
*.DB_CREATE_FILE_DEST = '+DATA'
d) For a duplicate database that is not a standby database, change the value of the DB_NAME initialization
parameter.
e) For a standby database, keep DB_NAME the same, but change the DB_UNIQUE_NAME initialization
parameter. Additionally, set
STANDBY_FILE_MANAGEMENT=AUTO
3) Start auxiliary instance in nomount mode. The auxiliary instance
should have access to the backups and archivelogs created by target
database in order for duplicate to succeed.
4) Duplicate the database using the following RMAN command set:
RMAN> connect auxiliary sys/passwd@auxiliary;
RMAN> duplicate target database to "
pfile="
At this point all the datafiles/logfiles will be in the specified ASM diskgroups, using OMF names, and the controlfile(s) will
reflect the new path names. In the case of the "duplicate for standby", the standby controlfile will also reflect the standby
database path names (and not the production).
Procedure for 10.2 or 10.1.0.5.0 databases
There are two options.
Option 1-
Follow steps outlined for the 10.1.0.4 procedure. This is the simplest option, if all the auxiliary files are in identical
subdirectories as the primary, and do not need to be re-distributed across disk groups.
Option 2-
Set the traditional DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT parameters. This option allows
more flexibility in assigning where datafiles and log files should reside at the auxiliary database.
1) Copy primary database init.ora to auxiliary instance init.ora
2) Modify auxiliary instance init.ora accordingly:
a) If not using OMF for control files, set the CONTROL_FILES parameter to the appropriate location.
Otherwise, do not set this parameter.
b) Set db_file_name_convert and log_file_name_convert to convert the diskgroup, e.g.
DB_FILE_NAME_CONVERT = ('+DATA', '+STDBY_DATA')
LOG_FILE_NAME_CONVERT = ('+DATA', '+STDBY_DATA')
c) For a duplicate database that is not a standby database, change the value of the DB_NAME initialization
parameter.
d) For a standby database, keep DB_NAME the same, but change the DB_UNIQUE_NAME initialization
parameter. Additionally, set STANDBY_FILE_MANAGEMENT=AUTO
3) Start auxiliary instance in nomount mode. The auxiliary instance
should have access to the backups and archivelogs created by target
database in order to duplicate to succeed.
4) Duplicate the database using RMAN command
RMAN> connect auxiliary sys/passwd@auxiliary;
RMAN> duplicate target database to "
pfile="
Keep in mind that, if the source filenames are in ASM OMF format, e.g., +DATA/
then RMAN, during restore, will generate new OMF names.
This is because ASM OMF filenames are unique and cannot be specified by the user or using DB_FILE_NAME_CONVERT;
i.e., it is generated by ASM code itself. Therefore, restored filenames will be different from the source filename, and only the
diskgroup name is honored in the filename conversion.
For example, suppose original filename is +DATA/proddb/datafile/users01.289.558716263 and
DB_FILE_NAME_CONVERT=('+DATA', '+STDBY_DATA')
After restore, the filename would not be
+STDBY_DATA/proddb/datafile/users01.289.558716263, but will be a newly created and OMF
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-1063130/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RMAN -- Frequently Asked Question (FAQ) (Doc ID 469777.1)
- How to Collect Diagnostics for Database Hanging Issues (Doc ID 452358.1)Database
- Performing a Failover to a Physical Standby DatabaseORMAIDatabase
- [轉帖]Release Schedule of Current Database Releases (Doc ID 742060.1)Database
- 【ASM】ORA-27504 ORA-27300 ORA-27303 while starting ASM (Doc ID 2281441.1)ASMWhile
- rman duplicate建立異地auxiliary Database oracle_11g oracle_sid不同UXDatabaseOracle
- rman duplicate建立異地auxiliary Database oracle_11g oracle_sid相同UXDatabaseOracle
- 【RMAN】RMAN備份至ASMASM
- RMAN Duplicate RAC to Single Instance
- rman duplicate操作手冊
- Oracle rman duplicate遷移測試Oracle
- Oracle 12c RMAN Performing Cross-Platform Transport of a PDB Using InconsistentOracleROSPlatform
- Oracle 最新PSU (Doc ID 2118136.2)Oracle
- expdp/impdp變慢 (Doc ID 2469587.1)
- Reading and Understanding Systemstate Dumps (Doc ID 423153.1)
- Oracle 下載最新psu (Doc ID 2118136.2)Oracle
- Converting Oracle Database from Linux to Windows using RMANOracleDatabaseLinuxWindows
- RMAN restore validate database報ORA-19693RESTDatabase
- PRCT-1011 : Failed to run "oifcfg" (Doc ID 1380183.1)AI
- 使用RMAN複製資料庫 active database資料庫Database
- 【ASM】Oracle RAC css啟動報錯"Duplicate voting file found"ASMOracleCSS
- ORA-15020:discoverd duplicate ASM disk "XXX_CJCDB_OCR_0002"ASM
- 【OMF】使用Oracle的OMF 特性Oracle
- duplicate遇到RMAN-05535: warning: All redo log files were not defined
- 【CURSOR】How to Monitor and tune Open and Cached Cursors (Doc ID 1430255.1)
- Oracle 12C Database File Mapping for Oracle ASM FilesOracleDatabaseAPPASM
- HowTo Restore RMAN Disk backups of RAC Database to Single Instance On Another NoRESTDatabase
- 理解RMAN backup database plus archivelog delete all input命令DatabaseHivedelete
- Migration Of An Oracle Database Across OS Platforms [ID 733205.1]OracleDatabaseROSPlatform
- rfs (PID:146054): Database mount ID mismatch案例Database
- 【DG】備庫RMAN還原方式搭建DG(不使用duplicate命令)
- Physical Standby Switchover_status Showing Not Allowed. (Doc ID 1392763.1)
- oracle11g: Scheduler Maintenance Tasks or Autotasks (Doc ID 756734.1)OracleAINaN
- 【DBA】Relinking Oracle Home 常見問題 (Doc ID 2048232.1)Oracle
- How To Replicate Data from Oracle to Postgres Using GoldenGate (Doc ID 1544137.1OracleGo
- Oracle使用RMAN將普通資料檔案轉成ASMOracleASM
- How to Increase CSS Misscount in single instance ASM installations [ID 729878.1]CSSASM
- 11g-Reduce Transportable Tablespace Downtime using XTTS (Doc ID 1389592.1)TTS
- 透過RMAN備份standby database成功恢復還原Database