關於rman duplicate 一些比較重要的知識點--系列三,rmanduplicate

來源:互聯網
上載者:User

關於rman duplicate 一些比較重要的知識點--系列三,rmanduplicate

FYI:

http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta020.htm#RCMRF126


rman duplicate database 必須是相同的平台,但是支援32bit\64bit 間複製,在複製完成後需要運行¥ORACLE_HOME/rdbms/admin/utlirp.sql
指令碼來轉換pl/sql 代碼



The DUPLICATE command requires one or more auxiliary channels. These channels perform the work of the duplication on the auxiliary database instance. 
rman duplicate 命令需要在備庫上至少要分配一個以上輔助通道(auxiliary channels)


If the source database files are in the Oracle Managed Files (OMF) format, then you cannot use the DB_FILE_NAME_CONVERT and 
LOG_FILE_NAME_CONVERT initialization parameters or the fileNameConversionSpec clause to generate new OMF file names for the 
duplicate database. If you do not follow this rule, the new OMF files generated from these three methods can cause problems
  使用duplicate 時必須要注意,如果源庫使用OMF,那麼我們就不能使用 DB_FILE_NAME_CONVERT 和 LOG_FILE_NAME_CONVERT 和其他的檔案轉
換方式,否者就會出問題;例如,備庫的控制檔案裡的資料檔案名是根據DB_FILE_NAME_CONVERT 和 LOG_FILE_NAME_CONVERT 轉換而來,但是實際

資料檔案求不在對應的路徑下,實際檔案會採用OMF來管理;這時需要使用:

1》RMAN catalog 和 switch database to copy

2》alter database rename file to 和 

3》switch datafile file# to copy 來修正控制檔案的資訊;

                                      


當然也有例外,如果只是換個asm 磁碟組名,其他路徑名不變,可以使用DB_FILE_NAME_CONVERT
The only exception to this rule is when changing only an ASM disk group name. Assume that source data files and online redo 
log files are stored in ASM disk group +SOURCEDSK. You want to store the duplicate database files in ASM disk group +DUPDSK. 
In this case, you can set the initialization parameters as follows:
DB_FILE_NAME_CONVERT = ("+SOURCEDSK","+DUPDSK")
LOG_FILE_NAME_CONVERT = ("+SOURCEDSK","+DUPDSK") 


RMAN uses DB_FILE_NAME_CONVERT or LOG_FILE_NAME_CONVERT to convert the disk group name, and then generates a new, valid file 
name based on the converted disk group name.


-如果源庫使用OMF,建議使用以下參數配置:
You have the following other supported options for naming data files when the source files are in the Oracle Managed Files format:

1.Use SET NEWNAME to specify names for individual data files. 
2.Set DB_FILE_CREATE_DEST to make all data files of the new database Oracle-managed files, except the files for which SET 


NEWNAME is used. You should not set DB_FILE_NAME_CONVERT if you set DB_FILE_CREATE_DEST.
DB_CREATE_FILE_DEST 
DB_RECOVERY_FILE_DEST 


對於redolog 如果沒有設定DB_RECOVERY_FILE_DEST, or DB_CREATE_ONLINE_LOG_DEST_n. 則會使用DB_CREATE_FILE_DEST 參數指定的目錄來存放

SQL> show parameter DB_CREATE_ONLINE_LOG_DEST
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_create_online_log_dest_1          string
db_create_online_log_dest_2          string
db_create_online_log_dest_3          string
db_create_online_log_dest_4          string
db_create_online_log_dest_5          string

若單獨指定 db_create_online_log_dest_* 參數,則redolog member 會冗餘放到這些單獨指定的目錄下

Supported options for naming online redo logs duplicated from Oracle-managed files are DB_CREATE_FILE_DEST, 

DB_RECOVERY_FILE_DEST, or DB_CREATE_ONLINE_LOG_DEST_n.


----DB_CREATE_ONLINE_LOG_DEST_n 參數解釋,為redolog,control file指定存放目錄,指定多個則多工
DB_CREATE_ONLINE_LOG_DEST_n (where n = 1, 2, 3, ... 5) specifies the default location for Oracle-managed control files and online redo logs. If more than one DB_CREATE_ONLINE_LOG_DEST_n parameter is specified, then the control file or online redo log is multiplexed across the locations of the other DB_CREATE_ONLINE_LOG_DEST_n parameters. One member of each online redo log is created in each location, and one control file is created in each location.


Specifying at least two parameters provides greater fault tolerance for the control files and online redo logs if one of the locations should fail.

If a file system directory is specified as the default location, then the directory must already exist; Oracle does not create it. The directory must have appropriate permissions that allow Oracle to create files in it. Oracle generates unique names for the files, and a file thus created is an Oracle Managed File.

對於檔案系統而言,指定的目錄必須許可權準確,且已經存在;如果沒有,oracle 不會自動建立


著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.