Professional Documents
Culture Documents
Document 452868
Document 452868
In this Document
Purpose
Scope
Details
Basic Steps to ACTIVE database duplication:
1. Preparing the auxiliary instance:
2. Create the necessary oracle NET connectivity.
3. Start RMAN and Connect to the Database Instances
4. Run the DUPLICATE database command:
References
APPLIES TO:
PURPOSE
The scope of this bulletin is to discuss the different type of RMAN 'duplicate database' feature in Oracle 11G.
In case you may want or need more about your current topic - please also access the Backup & Recover Community of Customers
and Oracle Specialists directly via:
https://community.oracle.com/community/support/oracle_database/database_backup_and_recovery
If you want to DUPLICATE FOR STANDBY, than check Note 1075908.1 Step by Step Guide on Creating Physical Standby Using RMAN
DUPLICATE...FROM ACTIVE DATABASE
SCOPE
DETAILS
You can create a duplicate database using the RMAN duplicate command. The duplicate database has a different DBID from the source
database and functions entirely independently.Starting from 11g you can do duplicate database in 2 ways.
Active database duplication copies the live target database over the network to the auxiliary destination and then creates the duplicate
database.Only difference is that you don't need to have the pre-existing RMAN backups and copies.The duplication work is performed by an
auxiliary channel.This channel corresponds to a server session on the auxiliary instance on the auxiliary host.
For the active database duplication, RMAN does one extra step .i.e. copy the target database datafiles over the network to the auxiliary
1 de 8 8/8/17 14:56
Document 452868.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...
instance
A RAC TARGET database can be duplicated as well. The procedure is the same as below. If the auxiliary instance needs to be a RAC-
database as well, than start the duplicate procedure for to a single instance and convert the auxiliary to RAC after the duplicate has
succeeded.
Scope of this note is restricted to Active database duplication . For the Backup-base duplication refer Note 259694.1 Oracle10G RMAN
Database Duplication.
If you are using SPFILE then only parameter required for the duplicate database is DB_NAME . Rest other parameters can be set in the
DUPLICATE command itself.If you are not using the SPFILE technique, then you need to set initialization parameters to set in the
initialization parameter file. Required parameters are :
DB_NAME
CONTROL_FILES
DB_BLOCK_SIZE
DB_FILE_NAME_CONVERT
LOG_FILE_NAME_CONVERT
DB_RECOVERY_FILE_DEST
In this bulletin for simplicity we are specifying all the required parameters in the pfile. For example:
initTEST.ora
------------
DB_NAME=TEST
diagnostic_dest='E:\oracle'
DB_FILE_name_CONVERT=('I:\app\apadhi\oradata\amar','E:\oracle\oradata\test')
LOG_FILE_NAME_CONVERT=( 'I:\app\apadhi\oradata\amar','E:\oracle\oradata\test')
SGA_TARGET=262144000
CONTROL_FILES='E:\oracle\oradata\TEST\control01.dbf'
COMPATIBLE= 11.1.0.0.0
Password file is must for the Active database duplication.A password file is not required for backup-based duplication. For Active database
duplication it connects directly to the auxiliary instance using the password file with the same SYSDBA password as target database. In case
you are using password file make sure to have same SYSDBA password as the target database.Also you can specify the PASSWORD FILE
option on the DUPLICATE command.In this case, RMAN copies the source database password file to the destination host and overwrites any
existing password file for the auxiliary instance.
In this bulletin we are using password file option in the duplicate command.
Create the database service (only for windows) and password file. For example :
% set ORACLE_SID=TEST
% set ORACLE_HOME=E:\oracle\product\11.1.0\db_1
% oradim -NEW -SID TEST
% orapwd FILE=E:\oracle\product\11.1.0\db_1\database\PWDTEST.ora PASSWORD=sys
For Unix/Linux the service is not needed, only the password file.
% sqlplus / as sysdba
2 de 8 8/8/17 14:56
Document 452868.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...
2.1 Insert a static entry for the auxiliary in the listener.ora file on the auxiliary server. In addition, tnsnames.ora entry is needed in both
target and auxiliary. For example :
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = apadhi-idc)(PORT = 1521))
)
Start RMAN and connect to the source database as TARGET, the duplicate database instance as AUXILIARY, and, if applicable,
the recovery catalog database.You can start the RMAN client on any host so long as it can connect to all of the database
instances. If the auxiliary instance requires a text-based initialization parameter file, then this file must exist on the same host
that runs the RMAN client application.
In this bulletin we are doing duplicate database from the auxiliary server. Look at the example :
% rman
3 de 8 8/8/17 14:56
Document 452868.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...
The simplest case is to use active database duplication to duplicate the database to a different host and use the different directory
structure.Look at the example :
4 de 8 8/8/17 14:56
Document 452868.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...
archived log for thread 1 with sequence 42 is already on disk as file E:\ORACLE\PRODUCT\11.1.0\DB_1\RDBMS
\ARC00042_0629061547.001
archived log file name=E:\ORACLE\PRODUCT\11.1.0\DB_1\RDBMS\ARC00042_0629061547.001 thread=1 sequence=42
5 de 8 8/8/17 14:56
Document 452868.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...
database dismounted
Oracle instance shut down
database opened
6 de 8 8/8/17 14:56
Document 452868.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...
}
executing Memory Script
Community Discussion
You can directly participate in the Discussion about this article below. The Frame is the interactive live Discussion - not a
Screenshot ;-)
7 de 8 8/8/17 14:56
Document 452868.1 https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-stat...
We often have to clone our database and want to complete the task without having to take a backup of the target
the following article and update this thread with any comments and/or suggestions:
Reem
(2 Clasificaciones)
Reem
Acciones
8 de 8 8/8/17 14:56