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

In the previous parts of the article series, first 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 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 started the installation of the hybrid cloud agent via Oracle Enterprise Manager, making sure we expanded the Optional Details section, and ticked “Configure Hybrid Cloud Agent”. The “Deploy Agent” process then commenced. This included remote validations (a check to see if enough space is available, etc.), and a background transfer of the agent software to the destination host. After the agent deployment completed successfully, the root.sh script file also needed to be executed. Note that this is important for proper agent functioning.

On the cloud server, we noted where the hybrid cloud agent had been installed; i.e., the agent home, by examining the contents of the “/etc/oragchomelist” file and verified that the agent was running on the cloud server. Next, we logged into the on-premises Enterprise Manager console as SYSMAN or a super administrator and drilled down to the Cloud Host home page, and examined the Enterprise Manager Configuration and performance metrics for that host that were captured and uploaded by the hybrid cloud agent.

Under Targets | Databases, we noticed that the cloud database has not been discovered, so it was not visible in the list of databases monitored and managed by Enterprise Manager. So we selected Add | Oracle Database from the menu. In the first step of the discovery process, we specified the IP address of the Oracle public cloud database server.

We can now continue the article series. Click on Next.

At this point, before proceeding, unlock the “dbsnmp” user in the Oracle Public Cloud database and change the user password. This will be needed for monitoring the cloud database. You can do this by ssh’ing to the OPC server, using the oraenv database utility to change the environment to the AHUTEST database, and then logging in to SQL*Plus as sysdba and making the change. This is shown below.

$ ssh <IP Address of OPC Server>
Authorized uses only. All activity may be monitored and reported.

[oracle@AHUTESTSERVER ~]$ . oraenv
ORACLE_SID = [AHUTEST] ?
The Oracle base has been set to /u01/app/oracle

[oracle@AHUTESTSERVER ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Tue Dec 15 10:08:07 2015
Copyright (c) 1982, 2014, Oracle.  All rights reserved.
Connected to:
Oracle Database 12c EE Extreme Perf Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Advanced Analytics
and Real Application Testing options

SQL> alter user dbsnmp account unlock identified by <password you want>
  2  /


User altered.

When you click “Next”, the OPC database and listener will both be discovered, as shown in Figure 16. Tick and select both the database and the listener.

Figure 16: Database Discovery: Results

Enter the Monitor Username as “dbsnmp” and the Monitor Password you have used in the alter statement. Click on “Test Connection”, and make sure the connection test is successful.

Click on Next. The review screen (Figure 17) appears with the discovered CDB, PDBs and listener on the cloud server.

Figure 17: Database Discovery: Review

Click on the Save button. The cloud database now appears in the list of Enterprise Manager database targets (Figure 18).

Figure 18: Database Target list

The status is shown as “Pending” but you can drill down to the details. The Database Home page appears (Figure 19).

Figure 19: Home Page of Cloud Database

            The cloud database home page appears just like a normal database target in Enterprise Manager, except that the “Oracle Cloud” words and icon are visible at the top left of the page. You can monitor and manage it just like a normal on-premises database.
Comparing On-premise and Cloud Database configurations

You can now compare configurations of your on-premises and cloud databases. Select Enterprise | Configuration | Comparison and Drift Management from the Enterprise Manager console. The Overview page appears, as seen in Figure 20.

Figure 20: Comparison and Drift Management: Overview

In the overview page, select “Create Comparison”. The One-Time Comparison screen appears (Figure 21).

Figure 21: One-Time Comparison

Select the on-premises 12c database “ahuprod.sainath.com” as the Reference Target (Current). In the Compared Targets list, select and add the cloud database AHUTEST. In addition, select the “Database Instance Template” as the Comparison Template. A comparison template helps avoid alerting on obvious differences.

Note that the “Advanced” mode button seen in Figure 21, allows you to alternatively select a saved reference target, as shown in Figure 22.

Figure 22: Advanced Mode: Selecting a Current or Saved Reference Target

Click on Submit. The results of the configuration comparison job appear shortly, as seen in Figure 23. The differences are displayed.

Figure 23: Comparison Results  

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 – i.e., between two database servers or two WebLogic servers.

The licensing needed on the on-premise sides is the DBLM (Database Lifecycle Management) pack for database comparisons, and the WLS Management Pack EE for WebLogic Server comparisons. On the Oracle Public Cloud side, you need the appropriate packs as well to be included in the cloud database version you select, such as Enterprise Edition Extreme Performance. This applies to other capabilities, such as compliance checks, as well.

We will continue exploring the hybrid cloud capabilities of Enterprise Manager, in the next part of this article series.