Upgrading Enterprise Manager Cloud Control 12c R1 (12.1.0.1) to 12c R2 (12.1.0.2)

In my blog post about the release of EM12c R2, I told that I will test to upgrade my current EM12c, so here’s the blog post I promised: As you may know, Oracle offers only the 1-system upgrade method for EM12c R2. I started with backing up my EM12c R1 (+ BP1) environment (DB, OMS), then I downloaded EM12c R2 installation files.

I created a directory, moved the installation files there and then unzipped the files:

I logged in as SYSMAN to repository database and checked if the tables in the Management Repository do not have any snapshots created:

As you see there were no snapshots. According to the upgrade document, if there are snapshots, I should drop them. While my OMS is still running, I run the following command to copy EMKEY to repository database:

It asked SYSMAN password, and then warned me that this operation will cause the EMKey to become unsecure. I have checked again to be sure that EMKey is configured properly:

Then I shutdown OMS and management agent that monitors the OMS and Repository DB:

Although it’s not mentioned in upgrade documents, I wanted to remove EM jobs from repository database, so I logged in as SYSMAN and run:

I run the installer in /u01/setup: ./runInstaller

I have unchecked the option to receiving security email notifications, and then accepted the warning about how important it is. On next screen, I entered my MoS credentials and checked if any updates available. Luckly, there was nothing.

I haven’t got any warning or failure on this screen, and I recommend you to satisfy all prerequisite checks.

I chose the one system upgrade (so my current OMS became selectable), then I selected it.

I entered the new location of Oracle Middleware (it should be an empty directory).

On next screen, I entered the SYS and SYSMAN passwords. When you click Next, the installer will check the DB connection and also DB settings (such as redolog sizes, shared_cursors etc) like it does in regular installation. The installer can fix some of them (it will ask you if you’re agree), but some of the warnings should be fixed by you. It’s possible to ignore these warnings but I recommend you to fix them. After this step, you’ll see “plug-in upgrade” screen, just click “next button”.

You may add new plug-ins but I recommend you to not to do it when upgrading. You can do it after upgrade.

I entered the weblogic password, and entered a directory name for OMS. After this step, you review the settings and then start installation.

It took about 2 hours on my virtual server. Now we’re ready to re-enable EM jobs (yes I know it was not necessary) and check if there are any invalid objects in EM repository. I also set “job_queue_processes” to 1000 (The installer set it to 0):

Now it’s time to upgrade agents! EM12c R2 has a great utility called “Upgrade Agents Console”.

Logged in to EM12c R2 console, after regular warnings about “security certificate”, I clicked “Setup”, then “Manage Cloud Control” (this is a new menu item), then click on “Upgrade Agents”. I added agents I want to be upgraded and then click submit. If you have not set privlidge delegation settings for your hosts, the user running Management Agent can not switch to root user. In this case, you should run the root.sh script as root, after the upgrade job is done:

I’m really impressed! All upgrade process completed without any problems. 🙂

Please share this post Share on Facebook8Share on Google+0Share on LinkedIn4Share on Reddit0Tweet about this on Twitter

Gokhan Atil is a database architect who has hands-on experience with both RDBMS and noSQL databases (Oracle, PostgreSQL, Microsoft SQL Server, Sybase IQ, MySQL, Cassandra, MongoDB and ElasticSearch), and strong background on software development. He is certified as Oracle Certified Professional (OCP) and is awarded as Oracle ACE (in 2011) and Oracle ACE Director (in 2016) for his continuous contributions to the Oracle users community.

44 Comments

  1. riyaz

    I have upgraded on windows with no issues. However i would like to know how can we clean up the old OMS_HOME and OLD WEBLOGIC NODEMANAGER.
    Also the procedure to clean up old management agent(12.1.0.1.0).

    • I did it the complicated way since I couldn’t run the Installer in GUI mode, You can do it with the Installer though… See this Document
      http://docs.oracle.com/cd/E24628_01/upgrade.121/e22625/appdx_delete_old_oms_home.htm#CHDHIHCC

      The other way to do it would be to simply detach the HOMES from orInvatory manually and the delete the directories… leaving the agent ofcourse…

      This is how I did it…

      $OLD_OMS_HOME/oms/oui/bin/runInstaller -silent -detachHome ORACLE_HOME=/opt/oracle/product/middleware/jdk16 ORACLE_HOME_NAME=jdk1

      $OLD_OMS_HOME/oms/oui/bin/runInstaller -silent -detachHome ORACLE_HOME=/opt/oracle/product/middleware/plugins/oracle.sysman.db.oms.plugin_12.1.0.1.0 ORACLE_HOME_NAME=oracle_sysman_db11

      $OLD_OMS_HOME/oms/oui/bin/runInstaller -silent -detachHome ORACLE_HOME=/opt/oracle/product/middleware/plugins/oracle.sysman.xa.oms.plugin_12.1.0.1.0 ORACLE_HOME_NAME=oracle_sysman_xa11

      $OLD_OMS_HOME/oms/oui/bin/runInstaller -silent -detachHome ORACLE_HOME=/opt/oracle/product/middleware/plugins/oracle.sysman.emas.oms.plugin_12.1.0.1.0 ORACLE_HOME_NAME=oracle_sysman_emas11

      $OLD_OMS_HOME/oms/oui/bin/runInstaller -silent -detachHome ORACLE_HOME=/opt/oracle/product/middleware/plugins/oracle.sysman.emas.oms.plugin_12.1.0.1.0 ORACLE_HOME_NAME=oracle_sysman_emas11

      $OLD_OMS_HOME/oms/oui/bin/runInstaller -silent -detachHome ORACLE_HOME=/opt/oracle/product/middleware/plugins/oracle.sysman.emfa.oms.plugin_12.1.0.1.0 ORACLE_HOME_NAME=oms12g1

      $OLD_OMS_HOME/oms/oui/bin/runInstaller -silent -detachHome ORACLE_HOME=/opt/oracle/product/middleware/plugins/oracle.sysman.emas.oms.plugin_12.1.0.2.0 ORACLE_HOME_NAME=oms12g1

      $OLD_OMS_HOME/oms/oui/bin/runInstaller -silent -detachHome ORACLE_HOME=/opt/oracle/product/middleware/Oracle_WT ORACLE_HOME_NAME=common12g1

      $OLD_OMS_HOME/oms/oui/bin/runInstaller -silent -detachHome ORACLE_HOME=/opt/oracle/product/middleware/oms ORACLE_HOME_NAME=oms12g1

      and then I just deleted the subdirectories after that.

  2. As usual Gokhan, you manage to put together these incredibly informative EM-related blog posts almost instantaneously — EM12c Release 2 hasn’t been out a full week yet.

    Great job as usual.

  3. Ray Smith

    Thanks for posting this as quickly as you did. Couple of questions:
    1. How long did the repository upgrade take?
    2. Do you have multiple OMS’ and how involved was the upgrade process for each additional OMS once the first OMS was upgraded?
    3. How wonderful is the agent upgrade page?

    • Gokhan Atil

      Hi Ray,

      1) I haven’t measured how long it takes but the total upgrade time takes less than 2 hours on a virtual environment.

      2) I have performed my upgrade tests on a single OMS system but according to the documents, all you need is to invoke OEM Installer for each other OMS after upgrading the first OMS in your system.

      3) Agent upgrade console is absolutely great! For applying BP1, you had to download and apply several patches to current agents. For upgrading to R2, all you need is to download new agent software via self-update and then replace currently deployed agents with newer versions using “agent upgrade console”.

  4. Pingback: Enterprise Manager 12c R2 Upgrade - lzy.sh

  5. Patrick

    Thanks very much. I followed your procedure and the upgrade completed successfully without any problem.

    Thanks again,
    Patrick

  6. Shaun

    HI There

    Just a quick question is where can i find documentation to clone enterprise manager 12c ?

    Regards
    Shaun

    • Gokhan Atil

      Shaun, I haven’t seen such a document, and I think you may have problems with the host names and other configurations on cloned system. Why do you want to clone it?

    • Shaun

      Want to clone the system to another server for testing on linux 6. Will it be beter to just install a new oem 12c and then restore the datafiles from the current to the new one ?

      Shaun

    • Gokhan Atil

      Oh I see. In this case, you may try 3rd party tools for cloning the whole server.

  7. Krishnan

    Hi Gokhan,

    Thank you for your post. ITs awesome. I have 2 OMS servers . currently we are in 12.1.0.1 and 11g agent migrations are in progress (2-system approach). IF I upgrade 12.1.0.2 , will the migration will get afffected?

    Thank you

    Regards
    Krishnan

    • Gokhan Atil

      Krishnan, I recommend you to wait until the agent migrations are completed.

  8. Shaun

    Hi There

    Thanks for the reply will it also work to do a new install of oem 12c on a another server and then just restoring the datafiles from the current one to the new installed one?

    Shaun

  9. joe

    Hi,

    thanks for this. I am running it now and it appears to be succeeding. I am not sure if i made a mistake or not in that, are there any of the file paths that one supplies that are the same as the previous 12.1.0.1 paths, or are they all different ? I made a new dir /oracle/app/middleware12102 while the old one was /oracle/app/middleware. Then for the dir where you supply weblogic password I gave it /oracle/app/middleware12102/oms where oms is a new dir i created. now there is not gc_inst dir. it is about 73% finished now.

  10. pavan

    Hello Gokhan,

    Thanks for your post. it is really helpful to understand and run upgrade. i have been assigned to upgrade 12c BP1 to 12cR2. in my case, i have two OMS behind the load balancer. i am not sure how do i go for upgrade. could you please provide your suggestions.

    • Gokhan Atil

      Pavan, upgrade the first OMS (where the Admin Server is running) as explained here. Then on second host, invoke the Enterprise Manager Cloud Control Installation Wizard, and on the Installation Types screen, select Upgrade an “Existing Enterprise Manager System”, and then, select One System Upgrade.

  11. Larry

    Hi Gokhan,

    Thank you very much for the explanation and screen shoots. However I have a question. in the doc http://docs.oracle.com/cd/E24628_01/upgrade.121/e22625/upgrading_12101_PS1_oms.htm#CJAFDJGG

    there is paragraph saying:

    On the Installation Details screen, do the following:

    Enter or validate the Middleware home.

    Note:
    Upgrade to 12c Release 2 (12.1.0.2) is an out-of-place upgrade, therefore you must either select an existing middleware home (where Enterprise Manager is not already installed) or enter a new middleware home where Oracle WebLogic Server and Java Development Kit are installed.

    If you do not have Oracle WebLogic Server 11g Release 1 (10.3.5) and Java Development Kit 1.6 v24+ installed, then enter the absolute path to a directory where you want the installer to install them. For example, /oracle/software/. Ensure that the directory you enter does not contain any files or subdirectories.

    If you have Oracle WebLogic Server and JDK already installed, then ensure that they are of the supported releases—Oracle WebLogic Server 11g Release 1 (10.3.5) and JDK 1.6 v24+. In this case, the installer detects them and displays the Middleware home where they are installed. Validate the path to this Middleware home. The installer detects and displays only those Middleware homes where Enterprise Manager is not already configured.

    the first paragraph is confusing,

    my current path looks like this:
    /i01/app/oracle/middleware
    /i01/app/oracle/middleware/oms
    /i01/app/oracle/middleware/wlserver_10.3
    /i01/app/oracle/middleware/jdk16

    according to:

    Upgrade to 12c Release 2 (12.1.0.2) is an out-of-place upgrade, therefore you must either select an existing middleware home (where Enterprise Manager is not already installed) or enter a new middleware home where Oracle WebLogic Server and Java Development Kit are installed.

    it sounds like I should use:
    /i01/app/oracle/middleware/oms2

    but in your example, your old home is:
    /oracle/Middleware
    and your new home is:
    /u01/oracle/Middleware
    it is kind of different than what the doc says.

    How do you understand that paragraph? I greatly appreciate your thoughts!

    • Gokhan Atil

      Hi Larry,

      It says you need to choose a new Middleware home (an empty directory), so Installation Wizard will install WebLogic Server and Java Development Kit into this directory, or you can use an existing Middleware Home which you installed manually by you (not by EM Cloud Control). In my opinion, it would be a very exceptional situation.

  12. ffonky

    Hi Gokhan,
    ive use your cookbook to upgrade my 12c to V2.1.0.2. goog Job.
    i have a question:
    how to go about self upgrade “not upgradable” agents.
    did you first deinstall the existing version before using self update to install the Version 2.1.0.2 or did you installed this parellel to the existing old version 2.1.1.0
    Thank´s for your help.

    • Gokhan Atil

      I do not understand what you mean by “not upgradable agents”? “Upgrade Agents Console” can upgrade any agent to current version. In case you need to upgrade an agent manually, I recommend you to deinstall the existing agent first, and then install new one.

  13. Pingback: Enterprise Manager 12c R2 Upgrade - lzy.sh

  14. Jai

    Hi Gokhan,

    I am facing an issue whenever we end the blackouts in OEM 12cR2. The targets goes into unknow state.

    I tried to clear the agent and resync the agent but still its in UNKNOWN status.

    I will like your help in case any patch need to deployed at the Agent 12c end.

    Thank You !

    Jai Gaurav

  15. Ali

    Hi Gokhan,

    I am attempting to upgrade my OEM12cR1 to OEM12cR2. I have followed your steps on my sandbox environment and it went perfectly. I have attempted to upgrade on our Production environment, I am hanging at 62%, Upgrading the Repository, Oracle has suggested to back out. I do not feel comfortable with that option. They are saying that it is a bug due to promote jobs running prior to the upgrade. What is your advice.

     

    • Gokhan Atil

      Ali, if Oracle said so 🙂 On the other hand, if it hangs while upgrading the repository, you may check the active sessions on database and see why it waits/hangs. You may solve the problem by examining the wait event.

  16. Nuno Santos

    Hi Gokhan,

    After finish the upgrade can we delete old Middleware folder?

    Thks

  17. Kenan

    Merhaba Gökhan hocam elinize saglık benim sormak istedigim bu yöntemi kullanarak 12.1.0.1’den 12.1.0.3′ ede upgrade yapabilir miyim ve ek olarak ben tanımlandıgım agent,matrix vs. upgrade sırasında hiç bir şeklilde silinmeyecek ve yeni versiyona da ek bir işlem yapmadan gelecebilecek mi ?

    • Gokhan Atil

      Kenan, evet aynı şekilde geçebilirsin. Adımlarda her hangi bir değişiklik yok.

  18. Ranjith Kuriya

    Hi Gokhan,

    I have upgraded Oracle Enterprise Manager dev environment from 12.1.0.1 to 12.1.0.3, planning to do same for prod OMS too.

    I will backup OMS,inventory,Software Library,Management repository) before upgrade and even filesystem backup.

    Trying to figure out backout steps if anything goes messy in prod, would be great if you give some details.

  19. Raghunath Iyengar

    Wonderful Gokhan. As always prety detail documentation.
    We did the upgrade to 12.1.0.2 without much issue. Looging forward to 12.1.0.3 upgrade in a few weeks as well.

  20. samuel

    Hi Gokhan,

    I have to upgrade from 12.1.0.2.0 to 12.1.0.2.4. ¿Can I use this tutorial?

    • Gokhan Atil

      Hi Samuel, I haven’t checked the upgrade process of 12.1.0.2.4 but it should be very similar so this tutorial should help.

  21. Patrick

    You have a very nice blog; well laid out and readable for any level of DB professional. I greatly appreciate this.

    Thank you for your assistance!

  22. Paul

    Hi Gokhan,

    Thanks for this article. I just upgraded one-node OMS and 21 agents from 12.1.0.2 to 12.1.0.4

    The EMREP database is still running on 11.2.0.4. I’m having a hard time to find documentation on upgrading this (to 12.1 RDBMS). Can I use the ‘normal’ database upgrade procedure for 11.2–>12.1?

    What do you think? I guess I will have to shutdown OMS & Central Agent before the upgrade (and backup ofcourse). But are there more requirements?

    Thanks for any ideas.

Leave Comment

Your email address will not be published. Required fields are marked *