Upgrade OEM 12.1.0.5 OMS to OEM13.2 Upgrade 12c 13c

Upgrade OEM 12.1.0.5 OMS to OEM13.2

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 , 12.1.0.5 for OMS and 12.1.0.2 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.

Preparation

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):

  1. Patching the Opatch to 12.1.0.1.7 or above.
  2. Setting the parameter optimizer_adaptive_features in the repository  to FALSE in advance.
  3. Patch the database with patch 160419 (= cumulative patch 22291127) including of running the datapatch utility
  4. Enable the ‘DELETE TARGET’ – audit setting
  5. 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…)
  6. Copy the EMkey to the repository
  7. Backup config of OMS
  8. Upgrade
  9. Run root script
  10. Upgrade central agent

Execution

1. Patching Opatch.

Downloaded patch 12.2.0.1.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):

image

Stop database – unfortunately also stop OMS of course.

Check at conflicts:

opatch prereq CheckConflictAgainstOHWithDetail -ph ./

And patch 22291127 with ‘opatch apply’

Post-check

opatch lsinventory –detail

Running the datapatch utility.

Start database and oms.

cd $ORACLE_HOME/OPatch

./datapatch –verbose

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

Cd $ORACLE_HOME/sqplus/admin

Rename glogin.sql temp_glogin.sql

Start datapatch utility again

Cd $ORACLE_HOME/OPatch

./datapatch –verbose

Validating logfiles…

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

Cd $ORACLE_HOME/sqplus/admin

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

Cd /u01/app/oracle/oms12c/oms/bin

./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.

image

Downloaded the 13.1.1.1.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

8. Upgrade

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

./em13200_linux64.bin “PLUGIN_LOCATION=/u01/orasoftware/OMS_13.2”

Mostly it’s next,next, hereby only the mentionable screens.

A warning about ports, ignored this.

image

The summary screen:

image

And.. Upgrade

During the upgrade I had an error, related to the ODA plugin:

EM 13c: Upgrading Enterprise Manager Cloud Control OMS from 12.1.0.5 To 13.2 Fails in Repository Configuration with ORA-00942 Error for Table EM_ODBA_ODASYS_TAGS_E (Doc ID 2340514.1)

Solution:

as sysman: alter table EM_ODBA_ODASYS_TAGS rename to EM_ODBA_ODASYS_TAGS_E

And retry the repository upgrade.

Finished:

image

9. Running the root script

~]# /u01/app/oracle/oms132/allroot.sh

Starting to execute allroot.sh ………

Starting to execute /u01/app/oracle/oms132/root.sh ……

/etc exist

/u01/app/oracle/oms132

Finished execution of /u01/app/oracle/oms132/root.sh ……

OMS done:

Upgrade OEM 12.1.0.5 OMS to OEM13.2 OMS done

10. Upgrade central agent

From the Setup menu, select Manage Cloud Control, then select Upgrade Agents.

Add the required agent, and upgrade.

image

Don’t forget to cleanup the agent as a post-upgrade task.

image

And done….

Regardz.

Resources

Upgrade guide: https://docs.oracle.com/cd/E73210_01/EMUPG/toc.htm

Plugin download: http://www.oracle.com/technetwork/oem/enterprise-manager/downloads/oem-plugins-2882950.html

Upgrade fails, cause plugin ODA: Upgrading Enterprise Manager Cloud Control OMS from 12.1.0.5 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)