This chapter contains the following sections:
While managing the IT infrastructure of your enterprise, your Oracle Cloud applications may need to utilize and analyze data stored on-premise. In such a situation, you may need to migrate the data stored on-premise to Oracle Cloud.
Hybrid Cloud management enables you to monitor certain Oracle Cloud targets using an on-premise Cloud Control monitored by Enterprise Manager. The new cloning wizards leverage Hybrid Cloud management and enable you to clone an on-premise database, schema, or a PDB to a database or a PDB that is deployed in Oracle Cloud. Effectively, this enables you to copy or migrate your on-premise data to Oracle Public Cloud.
Additionally, you can also clone databases, schemas, or PDBs that are deployed in Oracle Cloud to a database or PDB that is deployed on-premise, as well as clone databases and PDBs within Oracle Cloud.
The following table lists the use cases covered when cloning in Hybrid Cloud:
Table 16-1 Cloning in Hybrid Cloud Use Cases
Cloning Use case | Cloning Solutions |
---|---|
Clone to Oracle Cloud |
|
Clone to Oracle Cloud Using OSS |
|
Clone from Oracle Cloud |
|
Clone Within Oracle Cloud |
|
The following are the prerequisites for cloning in Oracle Cloud:
The on-premise Cloud Control instance must have the latest patches applied from MOS (Doc ID 1549855.1)
If you are cloning a database to Oracle Cloud, you must ensure that a Management Agent has been deployed on the destination host. Also, the destination target must be discovered.
Note:
If you do not have Internet access, the Management Agent must be configured in Hybrid Mode. For details on configuring the Management Agent in hybrid mode and deploying it on an Oracle Cloud target, see the Enabling Hybrid Cloud Management in the Oracle Enterprise Manager Cloud Administrator’s Guide.Cloning is supported only if Oracle Software Library is not configured with an upload location of the OMS Agent storage type.
It is recommended that you use a Test Master database or a Test Master pluggable database for cloning to Oracle Cloud.
To create a Test Master database, refer to the Oracle Enterprise Manager Cloud Administration Guide.
To create a Test Master pluggable database, refer to the Oracle Enterprise Manager Cloud Administration Guide.
The on-premise database and the database on Oracle Cloud should not be encrypted, should possess the same character set, and should have the same patch set level.
When cloning from on-premise to Oracle Cloud, the SELINUX security policy must set to permissive. If the security policy is enforced or set to enforcing, the cloning procedure may fail in the SecureCopyFiles step in the non-advanced wizard mode. You will need to configure the SELinux to allow RSYNC from the Agent (script).
To clone a database, schema(s), or a pluggable database from on-premise to Oracle Cloud, refer to the following use cases:
This figure shows how data is transferred between the on-premise host and Oracle Cloud.
Figure 16-1 Cloning a Database to Oracle Cloud
You can create a full clone of an on-premise database from Enterprise Manager to Oracle Public Cloud. While cloning a database instance, you can optionally choose to clone the Oracle Home. This allows you to move your on-premise database to Oracle Public Cloud. To clone an on-premise database to cloud, follow these steps:
To clone a database to Oracle Cloud using EMCLI, enter the following command:
emcli db_clone_management -cloneToCloud -input_file=data:/xyz/sdf/clone2cloud.props
where clone2cloud.props
is the properties file which provides the cloning parameters and their values.
Sample Properties File
#------------------------------------------------------------# # Source Details #------------------------------------------------------------# SRC_DB_TARGET_NAME=dbprod.xyz.com SRC_DB_TARGET_TYPE=database1 SRC_HOST_NORMAL_NAMED_CRED=SRCHOSTCRED:SYSMAN SRC_DB_CRED=DBPROD_CRED:SYSMAN SRC_WORK_DIR=/tmp PROFILE_INTERNAL_PATH=Database Provisioning Profiles/11.2.0.4.0/linux_x64/Database db11.us.xyz.com Profile 22-02-2016 05:13 PM PROFILE_VERSION_URN=oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DatabaseConfigProfile:2C5B357D5FF67E2AE053F17CB10A53F1:0.1 SOURCE_BACKUP_LOCATION=/scratch/dbprod/app/dbprod/fast_recovery_area/backup1456141446021 #------------------------------------------------------------# # Hybrid Gateway Details #------------------------------------------------------------# FORWARDER_HOST=slc04wim.us.oracle.com FORWARDER_HOST_CREDS=HOST:SYSMAN FORWARDER_STAGE_LOCATION=/scratch/fwd #------------------------------------------------------------# # Destination Details #------------------------------------------------------------# TARGET_HOST_LIST=129.124.22.34 HOST_NORMAL_NAMED_CRED=OPC_CRED:SYSMAN HOST_PRIV_NAMED_CRED=HOST_CRED_ROOT:SYSMAN DEST_LOCATION=/u03/backup DEST_WORK_DIR=/tmp #------------------------------------------------------------# # Database Definition #------------------------------------------------------------# COMMON_DB_SID=Dcln1 COMMON_DOMAIN_NAME=us.xyz.com COMMON_GLOBAL_DB_NAME=Dcln1.xyz.com DATABASE_TYPE=dbTypeSI DB_ADMIN_PASSWORD_SAME=true DATABASE_PASSWORDS=welcome1 #------------------------------------------------------------# # Software Configuration #------------------------------------------------------------# CLONE_HOME=Y # mention it as N if only database cloning is required #All these below parameters are only required if a new oracle home provisioning needs to be done. OINSTALL_GROUP=dba OSBACKUPDBA_GROUP=dba OSDBA_GROUP=dba OSDGDBA_GROUP=opc OSKMDBA_GROUP=opc OSOPER_GROUP=opc ORACLE_BASE_LOC=/u03/home/app/base ORACLE_HOME_LOC=/u03/home/app/base/product/11.2.0/dbhome_1 #------------------------------------------------------------# # Database Configuration #------------------------------------------------------------# ARCHIVE_LOG_MODE=YES DB_FILE_LOC=/u03/home/oradata DB_TARGET_DISPLAY_NAME=Dcln1 DB_TARGET_NAME=Dcln1.xyz.com FLASH_REC_AREA=/u03/home/app/home/fast_recovery_area FLASH_REC_AREA_SIZE=4182 LISTENER_PORT=2887 #Only needed if we are provisioning a new home LISTENER_NAME=LIST_2887 #--------------------------------------------------------------# # Data file transfer configuration parameters #--------------------------------------------------------------# # This will be moved to emctl metadata. for now its a variable in DP NUMBER_OF_THREADS=10 # This will be moved to emctl metadata. for now its a variable in DP # The chunk size in bytes. For now default is 250MB MIN_CHUNK_SIZE=262144000 #Transfer Unit can be FILE or CHUNK TRANSFER_UNIT=FILE #Maximum speed in Kbps BANDWIDTH_LIMIT=2048 #Time out in seconds for data transfer TIME_OUT=1200 #----------------------------------------------------------------# # Wallet Configuration #----------------------------------------------------------------# DEST_PATH_TO_WALLET=/u03/wallet WALLET_PASSWORD=Welcome123 NEW_WALLET_PASSWORD=welcome1 REKEY_REQUIRED=true
To clone an on-premise PDB to a PDB on Oracle Cloud, you can use either of the following solutions:
To clone a PDB to a CDB deployed in Oracle Cloud, follow these steps:
You can clone an on-premise pluggable database to Oracle Cloud. Before you proceed with the EM CLI command, it is recommended that you create a Test Master of the on-premise PDB and use the Test Master to create a clone. This is recommended so as to mask the data before it can be transferred over the internet.
To clone an on-premise pluggable database to Oracle Cloud, enter the EM CLI verb emcli pdb_clone_management -input_file=data:/xyz/sdf/pdb_clone.props -cloneToOracleCloud,
where pdb_clone.props
is the properties file which provides the cloning parameters and their values.
There are three methods in which you can clone a pluggable database. The difference between each of these methods is in the configuration of certain parameters in the properties file. The 3 methods and the details of the configuration parameters are explained below:
Operating System (OS) Image backup
Takes a backup of the source PDB and creates a new PDB. The BACKUP_TYPE parameter should specify the type of backup. The allowed values for BACKUP_TYPE are OSIMAGE, RMAN and TAR. The EXISTING_BACKUP and EXISTING_BACKUP_METADATA parameters should not be provided.
Sample properties file:
SRC_PDB_TARGET=cdb_prod_PDB SRC_HOST_CREDS=NC_HOST_SCY:SYCO SRC_CDB_CREDS=NC_HOST_SYC:SYCO SRC_WORK_DIR=/tmp/source DEST_HOST_CREDS=NC_SLCO_SSH:SYS DEST_LOCATION=/scratch/sray/app/sray/cdb_tm/HR_TM_PDB6 DEST_CDB_TARGET=cdb_tm DEST_CDB_TYPE=oracle_database DEST_CDB_CREDS=NC_HOST_SYC:SYCO DEST_PDB_NAME=HR_TM_PDB6 BACKUP_TYPE=OSIMAGE
Existing backup
Uses an existing backup of the source PDB and creates a new PDB. The BACKUP_TYPE parameter should specify the type of backup. The allowed values for BACKUP_TYPE are OSIMAGE, RMAN and TAR. The EXISTING_BACKUP parameter should specify the location with the backup name and EXISTING_BACKUP_METADATA should specify the location and the metadata file name for the backup.
Sample properties file:
SRC_PDB_TARGET=cdb_prod_PDB SRC_HOST_CREDS=NC_HOST_SCY:SYCO SRC_CDB_CREDS=NC_HOST_SYC:SYCO SRC_WORK_DIR=/tmp/source DEST_HOST_CREDS=NC_SLCO_SSH:SYS DEST_LOCATION=/scratch/sray/app/sray/cdb_tm/HR_TM_PDB6 DEST_CDB_TARGET=cdb_tm DEST_CDB_TYPE=oracle_database DEST_CDB_CREDS=NC_HOST_SYC:SYCO DEST_PDB_NAME=HR_TM_PDB6 EXISTING_BACKUP=/user1/pdbbackup/PDB1_Backup_14297779 EXISTING_BACKUP_METADATA=/user1/pdbbackup/PDB1_Backup_14297779/PDB1.xml BACKUP_TYPE=RMAN
Note:
To create a PDB backup, enter the verb emcli pdb_backup -inputFile="loaction of file containing properties required for taking backup of PDB"
, where the sample contents of the properties file is as follows:
TARGET_HOST_LIST=xyz.abccorp.com HOST_NORMAL_NAMED_CRED=XYZ_CRED:CRED_OWNER SRC_CDB_NAMED_CRED=CDB1_CRED:CRED_OWNER SRC_CDB_TARGET_NAME=CDB1 SRC_CDB_TARGET_TYPE=oracle_database SRC_PDB_TARGET_NAME=CDB1_PDB1 BACKUP_LOCATION=/user1/pdbbackup WORK_DIR_LOCATION=/tmp ORACLE_HOME_LOC=/scratch/d121hmcasm/product/12.1.0/dbhome_1
Unplug/plug
Unplugs the source PDB and creates a new PDB at the destination using the unplugged source, and then plugs the source back. EXISTING_BACKUP, EXISTING_BACKUP_METADATA and BACKUP_TYPE parameters should not be provided.
Sample properties file:
SRC_PDB_TARGET=cdb_prod_PDB SRC_HOST_CREDS=NC_HOST_SCY:SYCO SRC_CDB_CREDS=NC_HOST_SYC:SYCO SRC_WORK_DIR=/tmp/source DEST_HOST_CREDS=NC_SLCO_SSH:SYS DEST_LOCATION=/scratch/sray/app/sray/cdb_tm/HR_TM_PDB6 DEST_CDB_TARGET=cdb_tm DEST_CDB_TYPE=oracle_database DEST_CDB_CREDS=NC_HOST_SYC:SYCO DEST_PDB_NAME=HR_TM_PDB6
Note:
For all the three methods stated above, in case the destination PDB data files location is ASM then add the parameter DEST_STAGE_DIR who's value will be used as the destination while transferring the source PDB data files. This parameter is optional, if it is not provided a temporary directory will be used. For Linux systems the temporary directory is /tmp
.
You can clone a schema that is on-premise to Oracle Cloud either as a database or a pluggable database using EM CLI verbs.
Note:
As a prerequisite, it is recommended that you create a Test Master of the schema database and to use the schema of the Test Master to create a clone.
To clone a schema that is on-premise to Oracle Cloud either as a database or a pluggable database, follow the steps below:
You can clone a database that is on-premise to a pluggable database on Oracle Cloud using EM CLI verbs.
Note:
As a prerequisite it is recommended that you create a Test Master of the database and use the Test Master to create a clone.
To clone a database that is on-premise to Oracle cloud as a pluggable database, follow the steps below:
You can clone an on-premise database to Oracle Cloud by using backups stored in the Oracle Storage Service.
You can clone your on-premise database to Oracle Cloud using backups present on the Oracle Storage Service. These backups can be accessed both by the on-premise database as well as Oracle Cloud.
Cloning a database to Oracle Cloud using the Oracle Storage Service involves the following steps:
Defining the Oracle Cloud Backup Service Settings.
Configuring the Oracle Database Backup Cloud Service Account
Creating a database profile that is backed up and stored on the OSS
Cloning the Database
Defining the Oracle Cloud Backup Service Settings
The Oracle Public Cloud Database Backup Settings page allows you to define the storage account settings used to connect to the Oracle Cloud Database Backup Service. The global settings on this page are used when configuring individual databases to send backups to the Oracle Cloud Backup Service.
Specify the Service Name, Identity Domain, User ID, and Password. Optionally, if you are a using a custom storage container for your backups, you can specify it in the Backup Container field. Click Save to save your settings.
Configuring the Oracle Database Backup Cloud Service Account
Creating a Database Profile (On OSS)
Create a database profile on the Oracle Storage Service. On the Database Profile page, click the Oracle Cloud as Media radio button, select the required option from the storage accounts drop down list and follow the steps to create the profile.
Cloning the Database
From the Targets menu, select Databases.
For View, select Search List. From the View menu, select Expand All.
Select the database to be cloned and right click the mouse button.
From the Oracle Database menu, select Cloning, then select Clone to Oracle Cloud.
On the Source and Destination: Clone to Oracle Cloud page, do the following:
In the Source Credentials section, specify or search and select the database and Oracle Home credentials. If the source database is encrypted, specify the Wallet Password. Click OK.
In the Data Time Series section, the Prior Point in Time option is selected by default and a timeline of RMAN Backup on Oracle Cloud images appear. These backups are present in the Oracle Storage Service and can be directly used to clone the database on Oracle Cloud. Select the appropriate RMAN backup by clicking Select on the image.
In the Source Backup Location field, the location of the source backup you have selected appears.
In the Database Definition section, specify the Display Name for the database, the Global Database Name, SID.
In the Hosts section, you can choose:
Clone Oracle Home: If the Oracle Home is not pre-installed on the Oracle Public Cloud machine on which the database is being cloned, select the Clone Oracle Home option.
Note:
If you are provisioning a new Oracle Home and if your source is not acting as a hybrid gateway, you must use the hybrid cloud agent to transfer the binaries.Use an Existing Home: If the Oracle Home is already cloned, select the Use an Existing Home option
If you select the Clone Oracle Home option, select the Oracle Public Cloud host machine on which the Oracle Home is to be provisioned. The Shape (size) of the Oracle Public Cloud machine and the Site (Oracle Cloud) is displayed. Specify the following:
Database Host Credentials: Specify the database host credentials.
Run root scripts that require root privileges: You can either specify the root credentials or choose to enter them later to run the root scripts.
If you select the Use an Existing Home option, specify the following:
Oracle Home Location: Select the location of the Oracle Home on an Oracle Public Cloud machine already managed in Enterprise Manager. The host name of the machine in which the Oracle Home is present is displayed.
Database Host Credentials: Specify the database host credentials.
Click Next to navigate to the Configuration page. Specify the following details:
Software Location: Specify the Oracle Base and Oracle Home location where the database is to be cloned.
Oracle Database User Groups: Specify the name of the Oracle Database User Group performing this cloning operation.
Database Files Location: Specify the location where you want the data files, temp files, redo log files, and control files to be created.
Recovery Files Location: Specify the location where you want the recovery files, such as archived redo logs, RMAN backups, and other related files to be created. You can choose to use the fast recovery area. If you do, specify the fast recovery area size. In the Database Mode section, you can enable Read Only.
Listener Configuration: In the Hosts section on the previous page, if you have selected:
Clone Oracle Home: Specify the Listener Name and Port to create a new listener with which the database will be registered.
Use an Existing Home: Select the listener targets running under the new Oracle Home, to register the clone database, You can add new listeners by clicking Add, and specifying the listener name and port.
Database Credentials: Specify passwords for the SYS, SYSTEM, and DBSNMP administrative users in the clone database. You can choose to have the same password for all the three users or a different password for each.
Transparent Data Encryption: If the source database is encrypted, specify the location in which the Wallet is to be placed on the Oracle Public Host machine. Select the Use same password as source checkbox to use the same password as the host database. Select the Reset/Regenerate the Master Encryption Key to reset the encryption key.
Parallelism: Setting a higher Degree of Parallelism will ensure faster recompilation of objects. The default setting is the number of CPU count of the host. Click Next.
On the Initialization Parameters page, you can configure the values of various initialization parameters that affect the operation of the database instance. Select the parameter and click Edit to modify the value of the parameter. Click Next.
On the Post Processing page, you can select masking rules, subsetting rules, or custom scripts such as pre script, post script, and post SQL script. Click Next.
On the Schedule page, specify an instance name for the cloning deployment procedure. Also, specify the point in time when you want the cloning deployment procedure to begin.
In the Notification section, select the deployment procedure states for which you want to receive e-mail notifications. For example, if you select Scheduled and Succeeded for Status for Notification, you will receive e-mail notifications when the cloning deployment procedure is scheduled, and when it succeeds.
Click Next.
On the Review page, review all the details you provided. If you want to edit certain details, click Back to navigate to the required page.
Click Submit to launch the procedure to clone the database, transfer the selected backups to the destination host via the hybrid gateway. Once cloned, this database can be managed as an Enterprise Manager target.
To refresh the cloned database, from the Oracle Database menu, select Cloning, then select Clone Management. On the Clone Management Dashboard, select the database and click Refresh. Accept the default values in the wizard and optionally change the Initialization Parameters and Configuration details and click Refresh.
To clone a database, schema(s), or a PDB from Oracle Cloud, refer to the following use cases:
To clone a PDB from Oracle Cloud to an on-premise PDB, you can use either of the following solutions:
To clone a PDB from Oracle Cloud to an On-Premise PDB, follow these steps:
To clone a pluggable database on Oracle Cloud to an on-premise container database, enter the EM CLI verb emcli pdb_clone_management -input_file=data:/xyz/sdf/pdb_clone.props,
where pdb_clone.props
is the properties file which provides the cloning parameters and their values.
There are three methods in which you can clone a pluggable database. The difference between each of these methods is in the configuration of certain parameters in the properties file. The 3 methods and the details of the configuration parameters are explained below:
Operating System (OS) Image backup
Takes a backup of the source PDB and creates a new PDB. The BACKUP_TYPE parameter should specify the type of backup. The allowed values for BACKUP_TYPE are OSIMAGE, RMAN and TAR. The EXISTING_BACKUP and EXISTING_BACKUP_METADATA parameters should not be provided.
Sample properties file:
SRC_PDB_TARGET=cdb_prod_PDB SRC_HOST_CREDS=NC_HOST_SCY:SYCO SRC_CDB_CREDS=NC_HOST_SYC:SYCO SRC_WORK_DIR=/tmp/source DEST_HOST_CREDS=NC_SLCO_SSH:SYS DEST_LOCATION=/scratch/sray/app/sray/cdb_tm/HR_TM_PDB6 DEST_CDB_TARGET=cdb_tm DEST_CDB_TYPE=oracle_database DEST_CDB_CREDS=NC_HOST_SYC:SYCO DEST_PDB_NAME=HR_TM_PDB6 BACKUP_TYPE=OSIMAGE
Existing backup
Uses an existing backup of the source PDB and creates a new PDB. The BACKUP_TYPE parameter should specify the type of backup. The allowed values for BACKUP_TYPE are OSIMAGE, RMAN and TAR. The EXISTING_BACKUP parameter should specify the location with the backup name and EXISTING_BACKUP_METADATA should specify the location and the metadata file name for the backup.
Sample properties file:
SRC_PDB_TARGET=cdb_prod_PDB SRC_HOST_CREDS=NC_HOST_SCY:SYCO SRC_CDB_CREDS=NC_HOST_SYC:SYCO SRC_WORK_DIR=/tmp/source DEST_HOST_CREDS=NC_SLCO_SSH:SYS DEST_LOCATION=/scratch/sray/app/sray/cdb_tm/HR_TM_PDB6 DEST_CDB_TARGET=cdb_tm DEST_CDB_TYPE=oracle_database DEST_CDB_CREDS=NC_HOST_SYC:SYCO DEST_PDB_NAME=HR_TM_PDB6 EXISTING_BACKUP=/user1/pdbbackup/PDB1_Backup_14297779 EXISTING_BACKUP_METADATA=/user1/pdbbackup/PDB1_Backup_14297779/PDB1.xml BACKUP_TYPE=RMAN
Note:
To create a PDB backup, enter the verb emcli pdb_backup -inputFile="loaction of file containing properties required for taking backup of PDB"
, where the sample contents of the properties file is as follows:
TARGET_HOST_LIST=xyz.abccorp.com HOST_NORMAL_NAMED_CRED=XYZ_CRED:CRED_OWNER SRC_CDB_NAMED_CRED=CDB1_CRED:CRED_OWNER SRC_CDB_TARGET_NAME=CDB1 SRC_CDB_TARGET_TYPE=oracle_database SRC_PDB_TARGET_NAME=CDB1_PDB1 BACKUP_LOCATION=/user1/pdbbackup WORK_DIR_LOCATION=/tmp ORACLE_HOME_LOC=/scratch/d121hmcasm/product/12.1.0/dbhome_1
Unplug/plug
Unplugs the source PDB and creates a new PDB at the destination using the unplugged source, and then plugs the source back. Both, EXISTING_BACKUP and BACKUP_TYPE parameters should not be provided.
Sample properties file:
SRC_PDB_TARGET=cdb_prod_PDB SRC_HOST_CREDS=NC_HOST_SCY:SYCO SRC_CDB_CREDS=NC_HOST_SYC:SYCO SRC_WORK_DIR=/tmp/source DEST_HOST_CREDS=NC_SLCO_SSH:SYS DEST_LOCATION=/scratch/sray/app/sray/cdb_tm/HR_TM_PDB6 DEST_CDB_TARGET=cdb_tm DEST_CDB_TYPE=oracle_database DEST_CDB_CREDS=NC_HOST_SYC:SYCO DEST_PDB_NAME=HR_TM_PDB6
Note:
For all the 3 methods explained above, in case the destination PDB data files location is ASM then add the parameter DEST_STAGE_DIR who's value will be used as the destination while transferring the source PDB data files. This parameter is optional, if it is not provided a temporary directory will be used. For Linux systems the temporary directory is /tmp.
You can clone a schema that is on Oracle Cloud to on-premise either as a database or as a pluggable database using EM CLI verbs. To do so, follow the steps below:
You can clone a database that is on Oracle Cloud to on-premise as a pluggable database using EM CLI verbs. To do so, follow the steps below:
To clone a database from Oracle Cloud, follow these steps:
You can clone a database from Oracle Cloud using the following EMCLI command:
emcli db_clone_management -cloneFromCloud -input_file=data:/xyz/sdf/clonefromcloud.props
where clonefromcloud.props
is the properties file which provides the cloning parameters and their values.
Sample Properties File
#------------------------------------------------------------# # Source Details #------------------------------------------------------------# SRC_DB_TARGET_NAME=hrdb.us.oracle.com SRC_DB_TARGET_TYPE=oracle_database SRC_HOST_NORMAL_NAMED_CRED=OPC_209:SYSMAN SRC_DB_CRED=CLOUDDB_CRED:SYSMAN SRC_WORK_DIR=/tmp PROFILE_INTERNAL_PATH=Database Provisioning Profiles/11.2.0.4.0/linux_x64/Database db11.us.oracle.com Profile 22-02-2016 05:13 PM PROFILE_VERSION_URN=oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DatabaseConfigProfile:2C5B357D5FF67E2AE053F17CB10A53F1:0.1 SOURCE_BACKUP_LOCATION=/u01/hrdb/fast_recovery_area/hrdb/backup1458714912986 #------------------------------------------------------------# # Hybrid Gateway Details #------------------------------------------------------------# FORWARDER_HOST=slc04wim.us.oracle.com FORWARDER_HOST_CREDS=HOST:SYSMAN FORWARDER_STAGE_LOCATION=/scratch/fwd #------------------------------------------------------------# # Destination Details #------------------------------------------------------------# TARGET_HOST_LIST=slc01aia.us.oracle.com HOST_NORMAL_NAMED_CRED=SLC01AIA_CRED:SYSMAN HOST_PRIV_NAMED_CRED=SLC01AIA_CRED_ROOT:SYSMAN DEST_LOCATION=/scratch/backupStage DEST_WORK_DIR=/tmp #------------------------------------------------------------# # Database Definition #------------------------------------------------------------# COMMON_DB_SID=hrcln COMMON_DOMAIN_NAME=us.oracle.com COMMON_GLOBAL_DB_NAME=hrcln.us.oracle.com DATABASE_TYPE=dbTypeSI DB_ADMIN_PASSWORD_SAME=true DATABASE_PASSWORDS=welcome1 #------------------------------------------------------------# # Software Configuration #------------------------------------------------------------# #All these are only Applicable if a new oracle home provisioning needs to be done. CLONE_HOME=Y OINSTALL_GROUP=dba OSBACKUPDBA_GROUP=dba OSDBA_GROUP=dba OSDGDBA_GROUP=opc OSKMDBA_GROUP=opc OSOPER_GROUP=opc ORACLE_BASE_LOC=/scratch/app/dbhome11204 ORACLE_HOME_LOC=/scratch/app/dbhome11204/product/11.2.0/dbhome_1 #------------------------------------------------------------# # Database Configuration #------------------------------------------------------------# ARCHIVE_LOG_MODE=YES DB_FILE_LOC=/scratch/app/dbhome11204/oradata DB_TARGET_DISPLAY_NAME=HRCLN DB_TARGET_NAME=hrcln.us.oracle.com FLASH_REC_AREA=/scratch/app/dbhome11204/fast_recovery_area FLASH_REC_AREA_SIZE=4182 LISTENER_PORT=2887 //Only needed if we are provisioning a new home LISTENER_NAME=LIST_2887 #--------------------------------------------------------------# # Data file transfer configuration parameters #--------------------------------------------------------------# # This will be moved to emctl metadata. for now its a variable in DP NUMBER_OF_THREADS=10 # This will be moved to emctl metadata. for now its a variable in DP # The chunk size in bytes. For now default is 250MB MIN_CHUNK_SIZE=262144000 #Transfer Unit can be FILE or CHUNK TRANSFER_UNIT=FILE #Maximum speed in Kbps BANDWIDTH_LIMIT=2048 #Time out in seconds for data transfer TIME_OUT=1200 #----------------------------------------------------------------# # Wallet Configuration #----------------------------------------------------------------# DEST_PATH_TO_WALLET=/u03/wallet WALLET_PASSWORD=Welcome123 NEW_WALLET_PASSWORD=welcome1 REKEY_REQUIRED=true
To clone a database or a pluggable database within Oracle Cloud, refer to the following use cases:
To clone a pluggable database within Oracle Cloud, you can use either of the following solutions:
You can create a full clone of a PDB using the new Clone PDB Wizard. To create a full clone PDB, follow these steps:
To create a full clone of a pluggable database, execute the verb emcli pdb_clone_management -input_file=data:/xyz/sdf/pdb_clone.props
, where pdb_clone.props
is the properties file.
Sample properties file (pdb_clone.props):
SRC_PDB_TARGET=cdb_prod_PDB SRC_HOST_CREDS=NC_HOST_SCY:SYCO SRC_CDB_CREDS=NC_HOST_SYC:SYCO SRC_WORK_DIR=/tmp/source DEST_HOST_CREDS=NC_SLCO_SSH:SYS DEST_LOCATION=/scratch/sray/app/sray/cdb_tm/HR_TM_PDB6 DEST_CDB_TARGET=cdb_tm DEST_CDB_TYPE=oracle_database DEST_CDB_CREDS=NC_HOST_SYC:SYCO DEST_PDB_NAME=HR_TM_PDB6
Note:
If you are creating a full clone PDB on Oracle cloud, wherein both the destination PDB and the source PDB are in different CDBs, while both the CDBs are on Oracle Cloud, then ensure that the source PDB is in read-write mode. This is necessary since a database link is created in the destination CDB for cloning the PDB, and a temporary user is created in the source PDB for using the database link. If there is an existing database link in the destination CDB that connects to the source PDB, then use the parameter EXISTING_DB_LINK_NAME to provide the database link name in the properties file.
If the PDB full clone (on-premise) needs to be performed using a backup, then the following parameters should be added in the properties file.
BACKUP_TYPE=RMAN DEST_STAGE_DIR=/tmp/bkp_common
If the temporary backup location is shared across source and destination, then add the SKIP_DATA_TRANSFER parameter and set it to 'Y'. For example, SKIP_DATA_TRANSFER=Y
. This indicates that the data transfer step should be skipped in the clone procedure.
To clone a database within Oracle Cloud, you can use either of the following solutions:
To clone a database from Oracle Cloud using the Clone Wizard, follow the steps as described in Cloning a DB to Oracle Cloud Using the Clone Wizard.
Note:
The Hybrid Cloud Gateway server is not required as the database is being cloned within the Oracle Cloud.To clone a database within Oracle Cloud using EMCLI, enter the following command:
emcli db_clone_management -cloneToCloud -target_name="database target name" -target_type="database target type - <oracle_database | rac_database>” —input_file=”path of the input file”
Sample Properties File
#------------------------------------------------------------# # Source Details #------------------------------------------------------------# SRC_DB_TARGET_NAME=dbprod.us.oracle.com SRC_DB_TARGET_TYPE=oracle_database SRC_HOST_NORMAL_NAMED_CRED=SRCHOSTCRED:SYSMAN SRC_DB_CRED=DBPROD_CRED:SYSMAN SRC_WORK_DIR=/tmp PROFILE_INTERNAL_PATH=Database Provisioning Profiles/11.2.0.4.0/linux_x64/Database db11.us.oracle.com Profile 22-02-2016 05:13 PM PROFILE_VERSION_URN=oracle:defaultService:em:provisioning:1:cmp:COMP_Component:SUB_DatabaseConfigProfile:2C5B357D5FF67E2AE053F17CB10A53F1:0.1 SOURCE_BACKUP_LOCATION=/scratch/dbprod/app/dbprod/fast_recovery_area/backup1456141446021 #------------------------------------------------------------# # Hybrid Gateway Details #------------------------------------------------------------# FORWARDER_HOST=slc04wim.us.oracle.com FORWARDER_HOST_CREDS=HOST:SYSMAN FORWARDER_STAGE_LOCATION=/scratch/fwd #------------------------------------------------------------# # Destination Details #------------------------------------------------------------# TARGET_HOST_LIST=129.124.22.34 HOST_NORMAL_NAMED_CRED=OPC_CRED:SYSMAN HOST_PRIV_NAMED_CRED=HOST_CRED_ROOT:SYSMAN DEST_LOCATION=/u03/backup DEST_WORK_DIR=/tmp #------------------------------------------------------------# # Database Definition #------------------------------------------------------------# COMMON_DB_SID=Dcln1 COMMON_DOMAIN_NAME=us.oracle.com COMMON_GLOBAL_DB_NAME=Dcln1.us.oracle.com DATABASE_TYPE=dbTypeSI DB_ADMIN_PASSWORD_SAME=true DATABASE_PASSWORDS=welcome1 #------------------------------------------------------------# # Software Configuration #------------------------------------------------------------# CLONE_HOME=Y # mention it as N if only database cloning is required #All these below parameters are only required if a new oracle home provisioning needs to be done. OINSTALL_GROUP=dba OSBACKUPDBA_GROUP=dba OSDBA_GROUP=dba OSDGDBA_GROUP=opc OSKMDBA_GROUP=opc OSOPER_GROUP=opc ORACLE_BASE_LOC=/u03/home/app/gaurav ORACLE_HOME_LOC=/u03/home/app/gaurav/product/11.2.0/dbhome_1 #------------------------------------------------------------# # Database Configuration #------------------------------------------------------------# ARCHIVE_LOG_MODE=YES DB_FILE_LOC=/u03/home/oradata DB_TARGET_DISPLAY_NAME=Dcln1 DB_TARGET_NAME=Dcln1.us.oracle.com FLASH_REC_AREA=/u03/home/app/home/fast_recovery_area FLASH_REC_AREA_SIZE=4182 LISTENER_PORT=2887 #Only needed if we are provisioning a new home LISTENER_NAME=LIST_2887 #--------------------------------------------------------------# # Data file transfer configuration parameters #--------------------------------------------------------------# # This will be moved to emctl metadata. for now its a variable in DP NUMBER_OF_THREADS=10 # This will be moved to emctl metadata. for now its a variable in DP # The chunk size in bytes. For now default is 250MB MIN_CHUNK_SIZE=262144000 #Transfer Unit can be FILE or CHUNK TRANSFER_UNIT=FILE #Maximum speed in Kbps BANDWIDTH_LIMIT=2048 #Time out in seconds for data transfer TIME_OUT=1200 #----------------------------------------------------------------# # Wallet Configuration #----------------------------------------------------------------# DEST_PATH_TO_WALLET=/u03/wallet WALLET_PASSWORD=Welcome123 NEW_WALLET_PASSWORD=welcome1 REKEY_REQUIRED=true