Best Practices from Oracle Development's A‑Team

Cloning of Fusion Applications using Oracle Enterprise Manager Cloud Control 12c

Roland Koenn
Consulting Solution Architect


Cloning is a recurring requirement in almost every Oracle Fusion Applications environment. Oracle Enterprise Manager 12c (OEM) is an effective tool to create and automate the repeatable parts of the cloning process. Additionally to the cloning process itself OEM is very useful, when e.g. automating the scale-down of the environment or other actions that may be required to clone the particular environment.

Cloning Process Overview

The general cloning process is summarized in the following diagram. In this document the repeatable parts of the process are the focus. Highlighted in red in the diagram. The prerequisite steps and validation steps are not in scope. Detailed information about the complete cloning process can be found in the Cloning Guide. All target servers as well as the databases have to be registered in OEM and the manual cloning process should be executed and tested thoroughly.   ClonePicture1

Defining the Cloning Job

The creation of the cloning jobs in Oracle Enterprise Manager is a straight forward process if the manual cloning run has been documented properly. It is basically just a transfer of the executed steps into OEM. In the Job Library - accessible via the Enterprise Drop Down list - create a new “Multi-Task” Job. Select “Different targets for different tasks” from the target drop down list as the cloning process will be running on multiple steps across multiple hosts.


Restore Databases

In this example a simple RMAN operation is used to restore the database to the initial status. This is easily interchangeable with a RMAN duplicate database operation that could be used to copy the production database into the UAT environment. Alternatively a restore of a current backup from production to the development environment would be a possibility with the additional benefit of testing the backup procedure on a regular basis.


The ‘RMAN Script’ is able to execute the same script across multiple databases. If different scripts are required for the individual databases, one task is required per database. Simply add additional databases as targets via the “Add” button and follow the wizard.


In this example the Oracle Flashback Database feature is used to restore the database. This is especially helpful in environments where the clone process is run frequently, e.g. to the test upgrades or patching. Simply copy and paste the RMAN script in the parameters tab.


The usernames and passwords for all operations are securely entered in this screen. These credentials are automatically stored in the Oracle Enterprise Manager Credential store for further usage. They can be reused for other tasks/targets. Make sure to adopt a naming schema for the named credentials especially in complex environments.


This concludes the RMAN Script task. Clicking on continue will get OEM to return to the Job view. The next task will be managing the file system restore.


Restore Gold Images to file system

Additionally to the database being restored - the file system needs to be cleared/reset to a state where the master TAR files can be extracted. This is done using the ‘OS Command’ task. Select the target servers based on the particular system requirements. This can potentially be broken down into multiple task to allow parallelization.


The OS Command Task allows the usage of complex OS scripts. Oracle Enterprise Manager offers a variety of Target Properties that can be used in the script to allow additional flexibility and functionality in the script. In this example the script is simply removing the entire Fusion Applications and Identity Management file system and then extracts the Gold Images from the tar archive that has been created as part of the manual clone run. Alternatively other technologies like ZFS snapshots could be used at this stage to restore the file system to the initial status.


Username and password are stored in the OEM credential store. Make sure that proper OS permissions are allocated to the selected users in order to execute all the steps in the script. These credentials can be reused for the later tasks.


Clone Execution Phases

The next phase represents the actual runs of the faclone.sh tool. Usually faclone.sh is executed 4 times – IDMMT, IDMWT, FAMT and FAWT. These phases are described in detail in the Cloning Guide.  For this step the “OS Command” task is used as well. Simply add the hosts as targets where the scripts need to be executed, e.g. the primodial host for FAMT.


At this stage only the “Single Operation” command type is being used. Based on the return value of the faclone.sh script this step will succeed or fail. In this example the command used is e.g.:

 “/u01/app/clone/bin/faclone.sh -p /u01/app/clone/clone.rsp clone idmmt”

Further details about faclone.sh can be found in the Cloning Guide.


The named credentials are being reused simply by selecting them in the Credentials screen. Usually the user that has been used for the provisioning of FA can be selected.


These steps are repeated to create individual tasks for the IDMMT, IDMWT, FAMT and the FAWT executions. After all the required steps are created the dependencies need to be configured. Generally the cloning process is a serialized process, however certain activities like restoring the database and resetting the file system could potentially be parallelized. Clicking the “Save to Library” Button finishes the creation of the Job and it is ready to be scheduled.


Scheduling the Cloning Job

The Oracle Enterprise Manager Cloud Control Job System offers multiple options to schedule the job to run at a specific time, regularly based on a schedule or simply on demand. In the Job Library use the search function to locate the previously created job, select it and click the “Submit” button to open up the scheduler window.


In this example the job is executed immediately. However this screen allows you to create a schedule to meet the individual requirements for your organization.


The access screen is mainly used to configure notifications and allows granting permissions on the job to view or control the executions. By default all administrators inherit view permissions on the job. This permission does not allow the control, e.g. start/stop/scheduling of the job.


The job can be monitored, while it is executing or after has been finished. Notifications will be send out accordingly based on the selected options on the previous screen. An additional advantage for using OEM is the automatic archival of previous executions.


Further Information

The process described here only uses a minimal set of the powerful Job System of the Oracle Enterprise Manager 12c. The process can be tailored to achieve automated cloning including error correction in nearly every environment. Further information about the Job System can be found here

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha