Hey, did you catch that redirect? The Toad World URL is now community.toadworld.com. Don't worry -- you'll still find all the same great content here (and more on the way). We're just in the process of giving our Toad World site some well-deserved love. Stay tuned for some more updates coming this way.
Meanwhile, enjoy community.toadworld.com.
by Porus Homi Havewala
Ever since Enterprise Manager 12c Release 5, released in June 2015, Oracle Enterprise Manager 12c (and now 13c, released in December 2015) allows an on-premise Enterprise Manager OMS (Oracle Management Service) to install Hybrid Cloud Agents on your Oracle Cloud Database servers.
In this article series, we are looking at the steps for setting up and using the Hybrid Cloud via Enterprise Manager. In the previous part of this article series, we have gone through the pre-steps and then installed a Hybrid Cloud Agent. We discovered the databases and started to monitor the hybrid cloud.
We then looked at configuration comparisons and configuration management for the Hybrid Cloud, as well as compliance standards enforcement. We then cloned a PDB to the cloud, and back again to on-premise.
Drilling down, you can go to the on-premise PDB home page. In this case, the performance details appear, since it is an on-premise pluggable database and it relies on the local Enterprise Manager repository to find out if the Enterprise Manager Packs are licensed.
Note that if the clone procedure errors out with a connection issue such as shown in the screenshot below or any other sudden connection loss issue, you may need to restart the cloud agent.
The cloud agent can be restarted as follows:
[oracle@em12c ~]$ ssh <IP Address of OPC server>
Authorized uses only. All activity may be monitored and reported.
[oracle@AHUTESTSERVER ~]$ cd /u01/app/oracle/product/agentHome/agent_inst/bin
[oracle@AHUTESTSERVER bin]$ ./emctl stop agent
Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
Stopping agent ..... stopped.
[oracle@AHUTESTSERVER bin]$ ./emctl start agent
Starting agent ............... started.
You may also need to restart the hybrid gateway agent (which in our case is the agent on the OMS server). Then, you can retry the failed step of the procedure. The procedure now completes successfully.
We have now completed the Clone to cloud and clone from cloud scenario.
UnPlug PDBs from on-premise and Plug into Cloud CDB
It is also possible to move PDBs to and fro from the cloud by using the unplugging and plugging of PDBs. However, this involves more steps so this method is optional, you may or may not use it.
Drill down to the on-premise ahuprod CDB Home page, and from the Oracle Database menu, select Provisioning.. Provision Pluggable Databases.
On the Provision Pluggable Databases page, select “Create New Pluggable Databases”.
Select “Clone an Existing PDB” and Full Clone. Select the on-premise Host credential.
Click Next. The Identification screen appears.
Name the new clone PDB as “SALESTEST”. Click Next.
Select the PDB datafile location (as per the standards used on our installation, this is /u02/oradata/<CDB Name>/<PDB Name>).
Schedule the Create Pluggable Database to run immediately and go to the Next screen.
After the review, click Submit.
Select “View Execution Details”.
The procedure completes in 1.5 minutes. The SALESTEST PDB is now seen in the database list under the ahuprod CDB.
This time, select “Unplug Pluggable Databases”.
Launch the procedure.
Select the SALESTEST PDB to unplug.
Select the On-premise Host credential. Click on Next.
On the Destination page, select Software Library as the destination, and “Generate PDB Archive”. Accept or change the PDB template name, and click on Next.
Schedule the unplugging to run immediately.
Review and submit.
The unplug procedure completes in under 2 minutes.
In the Targets.. Databases screen, drill down to the AHUTEST cloud database home page.
From the Oracle Database menu, select Provisioning.. Provision Pluggable Databases.
This time, select “Create New Pluggable Databases” and hit Launch.
Select “Plug an unplugged PDB”.
As the Cloud Host credential, select the Named credential “NC_OPC_DBCS” that you have used previously. This credential has the SSH private and public keys of the on-premise Enterprise Manager OMS server.
Enter SALESTEST as the new PDB name.
Select Software library and click on the search icon.
Select the PDB template that was recently unplugged from the on-premise database.
Having selected the correct unplugged PDB from the software library, click on Next.
Before plugging in the new PDB to the cloud CDB, the procedure performs some validation checks. The screenshot above shows what may happen when the character set of the PDB being plugged in is different from the character set of the destination CDB.
You can ignore the warning, as seen above, but the net result will be that the PDB after being plugged in will be opened only in restricted mode (i.e. only usable for administrative activities). So, it is better that the PDB and CDB use the same character set.
For example, the local “ahuprod” CDB and its PDBs can have AL32UTF8 as the character set, matching that of the cloud databases.
Click on Continue after validation completes.
Since the cloud database uses Oracle Managed Files, select the same. Make sure you have entered a temporary working directory, and click on Next.
Schedule the procedure to run immediately. Review and Submit. The procedure starts.
However, if the procedure errors out as shown in the above screenshot, you may need to restart the cloud agent. This can also happen at the end of the procedure as seen below.
The PDB “SALESTEST” that was plugged in to the Cloud CDB is now visible under the Cloud CDB “AHUTEST”.
This concludes the Hybrid Cloud article series.
In this series, we have seen a number of capabilities. First we installed a Hybrid Cloud Agent. We then discovered the cloud database and listener and started to monitor the hybrid cloud.
We looked at configuration comparisons and configuration management for the Hybrid Cloud, as well as compliance standards enforcement.
After this, we completed the cloning of PDBs back and forth from the cloud, and also via unplugging and plugging back in.
Our conclusion: Enterprise Manager works effectively with the Oracle Database hybrid cloud, and is bound to get better and better in future versions.