Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Rman duplicate is more important than others.

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Rman duplicate database must be the same platform, but replication between 32bit\ 64bit is supported, and $ORACLE_HOME/rdbms/admin/utlirp.sql needs to be executed after the replication is completed.

Script to convert the pl/sql code

The DUPLICATE command requires one or more auxiliary channels. These channels perform the work of the duplication on the auxiliary database instance.

The rman duplicate command requires at least one secondary channel (auxiliary channels) to be allocated on the slave database.

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

When using duplicate, it must be noted that if the source library uses OMF, then we cannot use DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT and other files to transfer

Change the way. Otherwise, something will go wrong; for example. The name of the data file in the control file of the slave library is converted according to DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT. However, if the actual data file is not in the corresponding path, the actual file will be managed by OMF. In this case, you need to use:

1 "RMAN catalog and switch database to copy

2 "alter database rename file to and

3 "switch datafile file# to copy to correct the information of the control file

Of course, there are exceptions. Suppose you just change the name of the asm disk group, the other pathnames remain the same, and you can use 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.

-assuming that the source database uses OMF, it is recommended to configure it with the following parameters:

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

For redolog, it is assumed that DB_RECOVERY_FILE_DEST, or DB_CREATE_ONLINE_LOG_DEST_n. The folder specified by the DB_CREATE_FILE_DEST parameter will be used to store the

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

If you specify the db_create_online_logdest* parameter separately. Then the redolog member will be redundant under these separately specified folders

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 parameter interpretation: specify a storage folder for redolog,control file, and multiplexing if you specify more than one

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.

For a file system, the specified folder must have accurate permissions and already exist; if not, oracle will not take the initiative to create it.

Note: the nofilenamecheck parameter needs to be explained:

If the location is different when copying, we will convert the file location with the parameter db_file_name_convert. But if we use the same location when copying. The nofilenamecheck parameter must be added here. This parameter informs the copy operation that it is not necessary to confirm that the file name is different before performing the restore operation. If the nofilenamecheck parameter is not specified, rman gives the following error:

RMAN-05001: auxiliary filename / DBSoft/oracle/oradata/woo/users01.dbf conflicts with a file used by the target database

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report