Ameba Ownd

アプリで簡単、無料ホームページ作成

Duplicate database rman 10g windows

2022.01.19 02:49




















The block size for the auxiliary database must match that of the target database. Table Filename Conversion Initialization Parameters. When duplicating to the same host or to a new host with a different file system, pay attention to all initialization parameters specifying path names. Verify that all paths are accessible on the host where the database is being duplicated.


Example shows sample initialization parameter settings for the duplicate database. You can run this command before or after instance startup. For example, you can create a server-side parameter file in the default location as follows, specifying the filename of the client-side initialization parameter file in the FROM clause:. Because RMAN shuts down and restarts the auxiliary instance as part of the duplication process, you must tell RMAN which client-side file to use if you use a client-side parameter file.


It is highly recommended that you create a server-side parameter file for use in database duplication. In this example, oracle is the password for the user with SYSDBA authority and aux is the net service name for the auxiliary instance:. Do not create a control file or try to mount or open the auxiliary instance.


RMAN shuts down and restarts the auxiliary instance as part of the duplication. Hence, it is a good idea to create a server-side initialization parameter file for the auxiliary instance in the default location. The client-side parameter file for the auxiliary instance must reside on the same host as the RMAN client used to perform the duplication. For example, enter:.


Make sure backups all target datafiles are accessible on the duplicate host. If you do not have backups of everything, then the duplicate operation fails. The database backup does not have to be a whole database backup: you can use a mix of full and incremental backups of individual datafiles.


Archived redo logs required to recover the duplicate database to the desired point in time must be accessible at the same path by the node where the duplicate database is to be created. These can be available either as backups for instance, on a media manager or as image copies or the actual archived redo logs. The backups or copies can be transferred to the local disk of the node that contains the duplicate database or possibly mounted across a network by some means such as NFS.


Start RMAN with a connection to the target database, the auxiliary instance, and, if applicable, the recovery catalog database. You can start the RMAN client on any host so long as it can connect to all the instances.


If the auxiliary instance requires a client-side initialization parameter file, then this file must exist on the same host that runs the RMAN client. In this example, a connection is established to three instances, all through the use of net service names:. The channel type DISK or sbt must match the media where the backups of the target database are located.


If the backups reside on disk, then the more channels you allocate, the faster the duplication will be. For tape backups, limit the number of channels to the number of devices available. The procedure to create a duplicate database depends on your configuration. This section contains the following topics:. The simplest case is to duplicate the database to a different host and to use the same directory structure.


In this case, you do not need to change the initialization parameter file or set new filenames for the duplicate datafiles. The client-side parameter file must exist on the same host as the RMAN client used to perform the duplication. The following example assumes that the RMAN client is running on the duplicate host. RMAN automatically allocates the configured channels, then uses all incremental backups, archived redo log backups, and archived redo logs to perform incomplete recovery.


If you create the duplicate database on a host with a different directory structure, then you must change several initialization parameters in order to generate new filenames for the duplicate database datafiles on the new directory structure. This procedure assumes that you use only initialization parameters to rename the duplicate datafiles and log files.


You can either create a client-side parameter file, or copy the parameter file from its location in the target host directory structure to the same location in the duplicate host directory structure using operating system utilities. Some may need to be changed. The following example assumes that the duplicate host can access the same media manager as the primary database host.


The example duplicates the database with an automatic sbt channel and uses a server-side parameter file located on the duplicate host to restart the auxiliary instance:. RMAN uses all incremental backups, archived redo log backups, and archived redo logs to perform incomplete recovery.


If automatic auxiliary channels are not configured, then allocate at least one auxiliary channel. The following example duplicates the database using configured channels and specifies an initialization parameter file:.


If channels are not configured for the auxiliary database, then allocate at least one auxiliary channel. If desired, specify the same number of redo log members and groups that are used in the target database. If you use a client-side parameter file to start the auxiliary instance, then specify the PFILE parameter.


The following example uses configured channels and a default server-side initialization parameter file for the database duplication, and uses the LOGFILE clause to specify names and sizes for the online redo logs:. You do not have to use the same number of redo log groups or redo log group members in the duplicate database as you did in the target database. If you start the auxiliary instance with a client-side parameter file, then specify the PFILE parameter.


The client-side parameter file must reside on the same host as the RMAN client used to perform the duplication. After the duplication is complete, clear the configured auxiliary names for the datafiles in the duplicate database, so that they are not overwritten by future operations.


For example, enter the following:. When creating a duplicate database on the same host as the target database, follow the same procedure as for duplicating to a remote host with a different directory structure as described in "Duplicating a Database on a Remote Host with a Different Directory Structure". You can duplicate the database to the same Oracle home as the target database, but you must use a different database name from the target database, and convert the filenames by means of the same methods used for conversion on a separate host.


The following sections discuss requirements when creating some or all files of the duplicate database in OMF or ASM storage:. When duplicating a database and storing the duplicate in OMF storage, you must make the following changes on the initialization parameter file for the duplicate database:. This will allow the database to generate valid OMF filenames for the duplicate datafiles. This will allow the database to generate valid OMF redo log filenames. Whether the online redo log and control file locations should be different from the datafile locations.


Table explains the required initialization parameter values, depending upon your requirements. For example, edit the auxiliary instance parameter file as follows to create the database files in the disk group disk1 :. If you want to store specific datafiles or tempfiles in an OMF destination, independent of the locations of the rest of the database files, then you can use the following steps:. For example:.


The target database trgt is on host1 and contains eight datafiles, which are spread out over multiple directories. To prepare for database duplication, you must first create an auxiliary instance. However, all backups, copies of datafiles, and archived logs used for creating and recovering the duplicate database must be accessible by the server session on the duplicate host.


As part of the duplicating operation, RMAN manages the following:. First we must create a password file for the duplicate instance. Create an INIT. ORA parameter file for the auxiliary instance, you can copy that from the target instance and then modify the parameters.


Make sure that a full backup of the target is accessible on the duplicate host. You can use the following BASH script to backup the target database. By Tushar - August 29, Connect to sys using sqlplus in admin command prompt Check whether your database is in archive log mode or not. It will show you the following details: It is always preferable to have your database in archive log mode.


The reason being if your database is in archive log mode you can recover from all committed changes in the event of an OS or disk failure.


This query will display the path of redo log files, their group and their status. It is always recommended to have a minimum of two members in one group. I intentionally have 1 member to generate a scenario for the sake of this practical. Now go to the specified path where the redo log member of group 6 is located and open it in a notepad. It will show some symbolic data.