Upgrade Oracle Enterprise Manager Cloud Control 12c Release 4 (12cR4) to Release 5 (12cR5)
This article describes a simple upgrade of Enterprise Manager Cloud Control 12c Release 4 (12cR4) to Release 5 (12cR5). Each upgrade potentially requires additional steps, so this is not meant as a replacement for reading the documentation.
- Oracle Enterprise Manager Cloud Control 12c Post-Installation Setup Tasks
- Oracle Enterprise Manager Cloud Control 12c Release 5 Installation on Oracle Linux 5.10 and 6.6
Download the following software:
Additional patches are required for some versions of the database. See here.
Cloud Control 12c Installation and Upgrade
For clarity, my starting 12cR4 installation had the following details.
HOSTNAME : ol6-emcc-upgrade.localdomain DB Version: 188.8.131.52 ORACLE_SID: emrep PORT : 1521 URL : https://ol6-emcc-upgrade.localdomain:7802/em
There are specific patches for different versions of the database prior to 184.108.40.206, as described here.
Make sure the privileges for the
DBMS_RANDOM package are as described in the documentation.
export ORACLE_SID=emrep export ORAENV_ASK=NO . oraenv export ORAENV_ASK=YES sqlplus / as sysdba GRANT EXECUTE ON dbms_random TO dbsnmp; GRANT EXECUTE ON dbms_random TO sysman; REVOKE EXECUTE ON dbms_random FROM public;
Make sure there are no invalid objects in the repository database.
SELECT owner, object_name, object_type FROM dba_objects WHERE status = 'INVALID' AND owner IN ('SYS', 'SYSTEM', 'SYSMAN', 'MGMT_VIEW', 'DBSNMP', 'SYSMAN_MDS');
If you have any, recompile them using the following commands. Only pick the schemas that have invalid objects though.
EXEC UTL_RECOMP.recomp_serial('SYS'); EXEC UTL_RECOMP.recomp_serial('DBSNMP'); EXEC UTL_RECOMP.recomp_serial('SYSMAN');
Edit the "/etc/security/limits.conf" file, increasing the following entry to 4096 if it is less than that. You will need to reboot after this.
oracle soft nofile 4096
Backup your repository. In my case, Cloud Control runs on a VM, so a database backup was performed, as well as a whole VM backup.
Copy the emkey using the following commands, adjust as required. You will have to enter the WebLogic console admin and sysman passwords.
export OMS_HOME=/u01/app/oracle/oms12cr4/oms $OMS_HOME/bin/emctl config emkey -copy_to_repos_from_file \ -repos_host ol6-emcc-upgrade.localdomain -repos_port 1521 -repos_sid emrep \ -repos_user sysman -emkey_file $OMS_HOME/sysman/config/emkey.ora Oracle Enterprise Manager Cloud Control 12c Release 4 Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved. Enter Admin User's Password : Enter Enterprise Manager Root (SYSMAN) Password : The EMKey has been copied to the Management Repository. This operation will cause the EMKey to become unsecure. After the required operation has been completed, secure the EMKey by running "emctl config emkey -remove_from_repos". $
Stop the OMS.
$OMS_HOME/bin/emctl stop oms -all
Create a directory for the new installation.
$ mkdir -p /u01/app/oracle/oms12cr5
Unzip the 12cR5 software.
$ mkdir em12cr5 $ unzip -d em12cr5 em12105_linux64_disk1.zip $ unzip -d em12cr5 em12105_linux64_disk2.zip $ unzip -d em12cr5 em12105_linux64_disk3.zip $ cd em12cr5
Run the installer.
If you wish to receive support information, enter the required details, or uncheck the security updates checkbox and click the "Next" button. Click the "Yes" button the subsequent warning dialog.
If you wish to check for updates, enter the required details, or check the "Skip" option and click the "Next" button.
If you have performed the prerequisites as described, the installation should pass all prerequisite checks. Click the "Next" button.
Select the "Upgrade an existing Enterprise Manager System" option. Select the "One System Upgrade" option. Select the OMS to be upgraded, then click the "Next" button.
Enter the new middleware home locations, then click the "Next" button.
Enter the database connection details and confirm the repository has been backed up, then click the "Next" button.
On the first warning dialog, click the "OK" button. The subsequent error screen should list things that can be fixed by by the installer.
If you have any additional warnings, check they don't look like show-stoppers, then click the "OK" button to continue.
If you are happy with the plug-in upgrade information, click the "Next" button.
Select any additional plug-ins you want to deploy, then click the "Next" button.
Enter the WebLogic details, then click the "Next" button.
If you are happy with the review information, click the "Install" button.
Wait while the installation and configuration take place.
When prompted, run the root scripts, then click the "OK" button.
Make note of the URLs, then click the "Close" button to exit the installer. A copy of this information is available in the "/u01/app/oracle/oms12cr3/oms/install/setupinfo.txt" file.
The login screen is available from a browser using the URL provided in the previous screen ("https://ol6-em12cr3.localdomain:7803/em"). Log in with the username "sysman" and the password you specified during your installation.
You are then presented with the startup screen you selected when the installed 12cR4.
Navigate to "Setup > Manage Cloud Control > Upgrade Agents".
Click the "+ Add" button, highlight any agents to upgrade, then click the "OK" button.
When you are happy with your selection, click the "Submit" button.
If you do not have "root" access or sudo configured to allow you to run the root scripts, click the OK on the warning message. The root scripts can be run after the installation completes.
Wait while the upgrade takes place. Once complete, click the "Done" button.
If you need to run any root scripts manually, do so now. They are located in the agent home on each monitored machines (AGENT_HOME/core/220.127.116.11.0/root.sh).
The upgrade is now complete.
Cloud Control is set to auto-start using the "gcstartup" service. The "/etc/oragchomelist" file contains the items that will be started by the system. After the upgrade, it may list both OMS installations. If you want to use this auto-start, you will need to amend the contents of the file to make sure it is consistent with the new installation.
/u01/app/oracle/oms12cr4/oms /u01/app/oracle/oms12cr5/oms /u01/app/oracle/agent12c/core/18.104.22.168.0:/u01/app/oracle/agent12c/agent_inst
On a simple installation the default auto-start will cause a problem as Cloud Control will attempt to start before the database has started. The service can be disabled by commenting out (using #) all the contents of the "/etc/oragchomelist" file to prevent the auto-start and use start/stop scripts described below.
If the start/stop needs to be automated, you can do it in the usual way using Linux service that calls your start/stop scripts that include the database management.
Use the following commands to turn on all components installed by this article. If you have a startup/shutdown script, remember to amend it to take account of the new paths.
#!/bin/bash export ORACLE_HOME=/u01/app/oracle/product/22.214.171.124/db_1 export OMS_HOME=/u01/app/oracle/oms12cr5/oms export AGENT_HOME=/u01/app/oracle/agent12c/agent_inst # Start everything $ORACLE_HOME/bin/dbstart $ORACLE_HOME $OMS_HOME/bin/emctl start oms $AGENT_HOME/bin/emctl start agent
Use the following commands to turn off all components installed by this article.
#!/bin/bash export ORACLE_HOME=/u01/app/oracle/product/126.96.36.199/db_1 export OMS_HOME=/u01/app/oracle/oms12cr5/oms export AGENT_HOME=/u01/app/oracle/agent12c/agent_inst # Stop everything $OMS_HOME/bin/emctl stop oms -all $AGENT_HOME/bin/emctl stop agent $ORACLE_HOME/bin/dbshut $ORACLE_HOME
For more information see:
- Upgrading Oracle Management Service and Oracle Management Repository in Graphical Mode
- Oracle Enterprise Manager Cloud Control 12c Release 5 Installation on Oracle Linux 5.11 and 6.6
Hope this helps. Regards Tim...