Duplicate control file oracle
RMAN supports the following commands, listed in order of precedence:. Specifies the file name stripped of directory paths. Specifies the absolute file number of the data file for which the new name is generated. Example illustrates a script that specifies new names for data files 1 through 5 and temp file 1. The script does not set a new name for data file 6 because it is in the TOOLS tablespace, which is excluded from the duplicate database.
Example is a variation of Example and uses a single SET command to name all data files in the database. For example, enter the following commands at the RMAN prompt to specify names for data files 1 through 5 :. The following sections discuss requirements for creating a duplicate database when some or all files of the duplicate database use OMF or ASM. When creating a duplicate database that uses Oracle Managed Files, you must set initialization parameters in the auxiliary instance.
Table describes the relevant parameters and recommended settings and Table lists the restrictions and initialization parameters that should not be set. Specifies the default location for Oracle managed data files. Set this parameter to the location for the Oracle Managed Files. Specifies the default location for Oracle managed control files and online redo logs.
If multiple parameters are set, then one control file and one online redo log is created in each location. Specifies the default location for the fast recovery area. The fast recovery area contains multiplexed copies of current control files and online redo log files.
Set this parameter if you want a multiplexed copy of the control file and online redo log file in the recovery area. Do not set this parameter if you want the duplicate database control files in an OMF format. Oracle recommends that you use a server parameter file at the duplicate database when using control files in an OMF format.
Converts the file name of a new data file on the primary database to a file name on the duplicate database. Do not set this parameter. Omitting this parameter enables the database to generate valid Oracle managed file names for the duplicate data files. Converts the file name of a new log file on the primary database to the file name of a log file on the standby database.
Omitting this parameter allows the database to generate valid Oracle managed online redo log file names. The difference is that you must identify the initialization parameters that control the location where files are created and set these parameters to an ASM disk group. In this example, you use active database duplication. Assume that the source database prod is on host1 and stores its data files in a non-ASM file system.
You want to duplicate the source database to database dupdb on remote host host2. You want to duplicate the target to database dupdb on remote host host2. You want to store the data files for dupdb in ASM. Because a duplicate database has a unique DBID, it is entirely independent of the primary database and can be registered in the same recovery catalog as the primary database. Typically, duplicate databases are used for testing.
A standby database , which is a special copy of the primary database that is updated by applying archived redo logs from the primary database. A standby database does not get a new DBID. FOR STANDBY command creates the standby database by restoring a standby control file, mounting the standby control file, and then restoring and recovering backups of the target datafiles.
The standby database is left mounted after duplication is complete. Note that backups of the standby database are interchangeable with backups of the primary database.
Hence, if incremental backups exist, RMAN applies only these backups to the restored files during recovery. Oracle Data Guard Concepts and Administration to learn how to create, manage, and back up a standby database.
RMAN uses the channel configuration from the target for auxiliary channels in the following circumstances:. You must be connected to both the target database and auxiliary instance. The target database cannot be a standby database. You can skip all tablespaces in the target database except the SYSTEM tablespace, undo tablespaces, and tablespaces containing rollback segments. RMAN does not check for completeness. For example, you can duplicate a data tablespace but not the tablespace containing the index for the data, or duplicate a tablespace that contains only one partition of a partitioned table.
You cannot use the same database name for the target and duplicate databases when the duplicate database resides in the same Oracle home as the target. Note that if the duplicate database resides in a different Oracle home from the target, then its database name just has to differ from other database names in that same Oracle home.
If the target and duplicate databases reside on different hosts, then you must do one of the following tasks for duplication to be successful:. Move backups and disk copies from the target host to the duplicate host to the same location as the target host so that the path names are identical. Move backups and disk copies from the target host to the duplicate host to a new location so that the path names are different , and then CATALOG them. Make sure that all backups and copies disk or sbt on the target host are remotely accessible from the duplicate host.
Make sure that the archived redo logs are available in the expected location in the new host. You cannot recover the duplicate database to the current point in time, that is, the most recent SCN. RMAN recovers the duplicate database up to or before the most recent available archived log: it cannot recover into the online redo logs. Specify new filenames or convert target filenames for the datafiles and online redo logs when the duplicate filenames must be different from the target filenames as when duplicating to the same host as the primary.
Create the directory to store the new controlfile. Edit init. That does not indicate there were created two controlfiles. Oracle will create the alias and the OMF entry when user specifies the file name. In this example, a second controlfile is going to be created on same diskgroup DATA1.
0コメント