Performing duplicate database with ASM/OMF/RMAN [ID 340848.1]

Performing duplicate database with ASM/OMF/RMAN [ID 340848.1]

 Modified 23-OCT-2010     Type BULLETIN     Status PUBLISHED 

In this Document
  Purpose
  Scope and Application
  Performing duplicate database with ASM/OMF/RMAN


 

 

Applies to:

Oracle Server - Enterprise Edition - Version: 10.1.0.2 and later   [Release: 10.1 and later ]
Information in this document applies to any platform.
***Checked for relevance on 23-OCT-2010***

Purpose

This article will illustrate how to duplicate ASM/OMF-based databases using RMAN.

Scope and Application

The procedures for 10.1.0.4 and earlier, as well as 10.1.0.5 slightly vary, thus both are shown.

Performing duplicate database with ASM/OMF/RMAN

For details on the 10.1.0.4 RMAN duplicate command see the following docset URL:
http://http://download.oracle.com/docs/cd/B28359_01/backup.111/b28270/rcmadvre.htm#i1006453

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 target /;
RMAN> connect auxiliary sys/passwd@auxiliary;
RMAN> duplicate target database to "<newdbname>"
      pfile="<parameter file location>";

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 target /;
RMAN> connect auxiliary sys/passwd@auxiliary;
RMAN> duplicate target database to "<newdbname>"
pfile="<parameter file location>";


Keep in mind that, if the source filenames are in ASM OMF format, e.g., +DATA/<db_unique_name>/datafile/xxxx.xx,
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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值