Despite the potential of Oracle Management Cloud, I’m a fan of Oracle Enterprise Manager, with its small imperfections. So when noticing a 12c Oracle Enterprise Manager on Linux, and targets on Windows, I took the challenge of modernizing the customer’s environment a bit. And the starting point , 126.96.36.199 for OMS and 188.8.131.52 database as repository wasn’t that bad at all. This post is purely about upgrading the OMS. Upgrading agents is a different story with Windows as target.
I think upgrading an OMS is all about preparation, so I read the upgrade guide carefully, and still it’s almost inevitable to miss something (also in this case).
Roughly the plan for my situation (single OMS, 1 instance repository, Oracle Linux):
- Patching the Opatch to 184.108.40.206.7 or above.
- Setting the parameter optimizer_adaptive_features in the repository to FALSE in advance.
- Patch the database with patch 160419 (= cumulative patch 22291127) including of running the datapatch utility
- Enable the ‘DELETE TARGET’ – audit setting
- Download the required plugin’s to a temporary directory (I did’nt do this by the way at my first attempt, had to start the upgrade again…)
- Copy the EMkey to the repository
- Backup config of OMS
- Run root script
- Upgrade central agent
1. Patching Opatch.
Downloaded patch 220.127.116.11.11.
Plain and simple. Renamed the Opatch directory, unzip p6880880_121010_Linux-x86-64, and ready to go.
Check with ‘opatch version’ if it’s done.
2. Setting the parameter ‘optimizer_adaptive_features’.
alter system set optimizer_adaptive_features=false scope=both
3. Patch the database with patch 160419
However this patch is superseded, I stuck with the plan (very conservative):
Stop database – unfortunately also stop OMS of course.
Check at conflicts:
opatch prereq CheckConflictAgainstOHWithDetail -ph ./
And patch 22291127 with ‘opatch apply’
opatch lsinventory –detail
Running the datapatch utility.
Start database and oms.
Unfortunately an error appears:
Datapatch fails with “catconInit: database is not open on the default instance” (Doc ID 2003488.1)
Solution: temporarily rename glogin.sql
Rename glogin.sql temp_glogin.sql
Start datapatch utility again
Patch 22291127 apply: SUCCESS
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/22291127/19694308/22291127_apply_OCCMREP_2018Jan16_11_26_58.log (no errors)
SQL Patching tool complete on Tue Jan 16 11:27:25 2018
Restore the glogin.sql
Rename temp_glogin.sql glogin.sql
Check the following log files in $ORACLE_BASE/cfgtoollogs/sqlpatch/22291127/<unique patch ID> for errors:
22291127_apply_<database SID>_<CDB name>_<timestamp>.log.
Didn’t need an RMAN upgrade, skipped this step.
4. Enable the ‘DELETE TARGET’ – audit setting
./emcli update_audit_settings -operations_to_enable=”DELETE_TARGET” -audit_switch=”ENABLE” -file_prefix=”aud”
5. Download the required plugin’s to a temporary directory
In my case, I forgot to downoad a compatible ODA plugin the first time.
Downloaded the 18.104.22.168.0_oracle.dba.odba_2000_0.opar from the plugin download pagina.
6. Copy the EMkey to the repository
/u01/app/oracle/oms12c/oms/bin/emctl config emkey -copy_to_repos [-sysman_pwd <sysman_pwd>]
Check this with
/u01/app/oracle/oms12c/oms/bin/emctl status emkey
The EMKey is configured properly, but is not secure.
Secure the EMKey by running “emctl config emkey -remove_from_repos”.
7. Backup OMS config
/u01/app/oracle/oms12c/oms/bin/emctl exportconfig oms -sysman_pwd Oracle123# -dir /home/oracle/job
Shutdown OMS and central agent
/u01/app/oracle/oms12c/oms/bin/emctl stop oms –all
/u01/app/oracle/agent12c/agent_inst/bin/emctl stop agent
Start upgrade with the parameter for the downloaded plugin
Mostly it’s next,next, hereby only the mentionable screens.
A warning about ports, ignored this.
The summary screen:
During the upgrade I had an error, related to the ODA plugin:
EM 13c: Upgrading Enterprise Manager Cloud Control OMS from 22.214.171.124 To 13.2 Fails in Repository Configuration with ORA-00942 Error for Table EM_ODBA_ODASYS_TAGS_E (Doc ID 2340514.1)
as sysman: alter table EM_ODBA_ODASYS_TAGS rename to EM_ODBA_ODASYS_TAGS_E
And retry the repository upgrade.
9. Running the root script
Starting to execute allroot.sh ………
Starting to execute /u01/app/oracle/oms132/root.sh ……
Finished execution of /u01/app/oracle/oms132/root.sh ……
10. Upgrade central agent
From the Setup menu, select Manage Cloud Control, then select Upgrade Agents.
Add the required agent, and upgrade.
Don’t forget to cleanup the agent as a post-upgrade task.
Upgrade guide: https://docs.oracle.com/cd/E73210_01/EMUPG/toc.htm
Upgrade fails, cause plugin ODA: Upgrading Enterprise Manager Cloud Control OMS from 126.96.36.199 To 13.2 Fails in Repository Configuration with ORA-00942 Error for Table EM_ODBA_ODASYS_TAGS_E (Doc ID 2340514.1)
Datapatch failure: Datapatch fails with “catconInit: database is not open on the default instance” (Doc ID 2003488.1)