In this article series, we are looking at the detailed steps for setting up the Oracle Hybrid Cloud via the latest version – Oracle Enterprise Manager Cloud Control 13c installed on premises. Our main intention is to install an Enterprise Manager hybrid cloud agent on our database cloud servers (on the Oracle public cloud) via the hybrid gateway, in the scenario where our company has databases running on premises as well as on the Oracle public cloud, and then to look at hybrid cloud management using Enterprise Manager.

In the previous parts of the article series, we completed the pre-setup steps for the hybrid cloud – such as setting up one of our on-premises Enterprise Manager Oracle Management Service (OMS) agents as the hybrid gateway agent, creating SSH keys for the OMS server, and then creating a named credential with SSH key credentials for the hybrid cloud. At the same time, we also created an Oracle Database service (a server with an Oracle database) on the Oracle public cloud.

Next, we completed the installation of the hybrid cloud agent via Oracle Enterprise Manager, which performed a background transfer of the agent software to the destination host. We logged into the on-premises Enterprise Manager console as SYSMAN or a super administrator and drilled down to the Cloud Host home page. On this page, we could see the Enterprise Manager configuration and performance metrics for the host; these metrics had been uploaded by the hybrid cloud agent. And after the database discovery process was completed, the cloud database appeared in the list of Enterprise Manager database targets, and it can now be monitored and managed just like a normal on-premises database.

Next, we compared Oracle database configurations by selecting Enterprise | Configuration | Comparison and Drift Management from the Enterprise Manager console, and creating a comparison. We selected the on-premises 12c database “” as the Reference Target (Current). In the Compared Targets list, we selected and added the cloud database AHUTEST. On submitting, the results of the configuration comparison job appeared in a short space of time, and the differences were displayed. Effectively, you have compared the configuration of a local on-premises database with that of a cloud database. This comparison can be done at the server level as well, and configurations at a certain date and time can be saved as a “Gold” configuration to compare to current configurations at regular intervals, to detect configuration drift. Oracle Enterprise Manager is also able to enforce the same compliance standards on the Oracle public cloud as well as on premises, which is perfect for a hybrid database setup.

Next, we looked into the cloning of PDBs from on premises to cloud, one of the main features of the Hybrid Cloud. As part of this process, we checked the patch set level of the cloud database by going to the cloud service console or by moving to the OPatch directory under the Oracle Home on the cloud server, and issuing the command “opatch lsinventory”. This displayed the patches that have been applied on the Oracle Home. In the case of any patch conflicts, you may need to “force apply” the patch for the patching to complete successfully. After you had completed the PSU patch application, you could then proceed with the actual PDB cloning, since the source and destination CDBs are now at the latest PSU.

We then went through the steps to preserve the Enterprise Manager Agent home when patching the cloud database. Next, we started the Clone to Oracle Cloud process.

Logged in as SYSMAN or a super administrator on the Enterprise Manager console, we could see both on-premises databases (ahuprod) and cloud databases (AHUTEST) in a single pane of glass in Targets | Databases. We right-clicked on the on-premises PDB “SALES”, which is in the ahuprod CDB, and selected Oracle Database | Cloning | Clone to Oracle Cloud. The Source and Destination screen appeared, and we filled in the Credentials for the on-premises side, as well as the cloud side. For the cloud “Database Host credential”, we used the “NC_OPC_DBCS” credential, which was pre-created with the local (OMS) server private and public keys. For the cloud database “SYSDBA Container Database credential”, we created a new named credential using the sys password that was specified when creating the cloud database.

The name of the destination PDB on the cloud side was entered as “SALESTST”, since this will be a test pluggable database. We also selected a user name and password for the PDB administrator of the new PDB. Then, we could have clicked on “Clone” to start the procedure, but instead we clicked on the “Advanced” button at the top of the page. This switched to Advanced mode, and a multiple page workflow appeared on the same screen.

We clicked on Next. The “Clone to Oracle Cloud: Configuration” page appeared. As per cloud database standards, whichare based on Oracle Flexible Architecture (OFA) standards, the PDB data files will reside on /u02, in the /u02/app/oracle/oradata/<PDB name> directory. You can also enter storage limits if you wish, such as the maximum PDB size or the maximum shared TEMP tablespace size. The default logging attribute for tablespaces creating with the PDB can also be specified – Logging, No Logging or Filesystem Like Logging.

After this, the Post Processing page appeared. This page showed us the importance of the Advanced mode, since it is possible to select a Data Masking Definition if it has been created for the source database. Masking is seamlessly integrated with Enterprise Manager. This makes sure that confidential data is masked when being cloned from an on-premises production database to a cloud development database.

A simple masking definition has already been created. This definition was named “LatestDataMaskDefinitionHR” (no spaces should be included in the definition name) and was selected at this point. This will mask some of the confidential columns in the Employees table, in the destination cloud PDB that will be created.

            Click Next. The Schedule screen appears (Figure 30).

Figure 30: Clone to Oracle Cloud: Schedule

In the Schedule screen, you can select a future date or run immediately. You can also choose to be notified on a certain resulting status such as Action Required, Suspended or Problems.

We continue in the next part of this article series.


About the Author

Porus Homi Havewala

Porus Homi Havewala is a Double Oracle Certified Master (OCM) in 11g and 10g. He was awarded the prestigious "Oracle ACE Director" title by Oracle USA in 2008. He worked as the Strategic Program Advisor at Oracle Corporation Singapore, and is a regional SME on Oracle Enterprise Manager technology, specifically concentrating on private/hybrid Database cloud capabilities on Oracle systems. Porus has worked prominently for a number of years at the largest telecommunications company Telstra in Australia, where he personally set up and managed the first production Enterprise Manager Grid Control 10g project in the world in the early 2000s, controlling thousands of Data Center targets with multiple Administrator teams around Australia. He has 26+ years of experience in the IT industry, and 18+ years of experience with Oracle Technology, including as an Oracle Developer and Oracle Senior DBA. He is the creator and manager of the Enterprise Manager blog with Oracle Press Credentials, the Clouds and Databases blog, and the "Oracle Senior DBA" group on with 61,000+ members. Porus is the author of thirteen published technical articles and three white papers on Enterprise Manager in the Oracle Technical Network (OTN), and has authored a number of Enterprise Manager Books. He started his technical writing with a book on Microsoft Foxpro as early as 1994. His recent Enterprise Manager books are as follows: Oracle Enterprise Manager Cloud Control 12c: Managing Data Center Chaos published by PACKT Publishing, and the latest book Oracle Database Cloud Cookbook with Oracle Enterprise Manager 13c Cloud Control published by Oracle Press. Dedication: I dedicate my pen and all its output to my beloved parents in heaven, they are the ones that have taught me the good values in life. Disclaimer: My writings in blog entries, articles or books express my views and opinions in my personal capacity and not that of Oracle Corporation.

Start the discussion at