Sunday, August 23, 2015

Upgrade OEM Cloud Control From 12.1.0.4 to 12.1.0.5 (Release 5)


Upgrade Oracle Enterprise Manager Cloud Control
From 12.1.0.4/3/2 to 12.1.0.5 (Release 5)


In this demonstration I am going to show how to upgrade Oracle Enterprise Manager Cloud Control from 12 Release 4 to 12c Release 5 in Graphical Mode. 

For Management repository I am using Oracle 11gR2 (11.2.0.4) with applied PSU 11.2.0.4.6.

In my case I don’t find any Unwanted Standalone Agents so I have not executed below task.  But if someone find unwanted agents then he can follow the below step as describe is in oracle documents.  For more details click here.



Deleting Unwanted Standalone Management Agents Before Upgrading from 12.1.0.4, 12.1.0.3, 12.1.0.2 to 12.1.0.5

While upgrading, you might see an error message stating that some Management Agents are still in Activation Pending state, or that the Deferred Data Migration Process (DDMP) or Accrued Data Migration Process (ADMP) is not complete. This indicates that the Enterprise Manager system is still undergoing a 2-system upgrade from its earlier release (10.2.0.5 or 11.1.0.1) to 12c Release 4 (12.1.0.4), 12c Release 3 (12.1.0.3), or 12c Release 2 (12.1.0.2).

To resolve this issue, wait until the DDMP and ADMP jobs are complete, and all Management Agents are switched over from the earlier release to 12c Release 4 (12.1.0.4), 12c Release 3 (12.1.0.3), or 12c Release 2 (12.1.0.2). Then upgrade to 12c Release 5 (12.1.0.5).
If you are sure you do not want to switch over some Management Agents from the earlier release to 12c Release 4 (12.1.0.4), 12c Release 3 (12.1.0.3), or 12c Release 2 (12.1.0.2), then delete such unwanted Management Agents before you start the upgrade process.
To delete these unwanted Management Agents, follow these steps:

·         Identify the unwanted Management Agents by running the following query as SYSMAN user in the Management Repository you are about to upgrade (12.1.0.4. 12.1.0.3, or 12.1.0.2 repository):
·          
select mt.target_name
from sysman.mgmt_targets mt, sysman.em_current_availability eca, sysman.PRE_UPGC_AGT_STAT_MGMT puasm
where mt.target_guid = eca.target_guid
and eca.current_status = 4 and eca.current_sub_status = 1
and mt.target_type='oracle_emd'
and puasm.target_guid = mt.target_guid
and puasm.UPGRADE_STATUS != 'IGNORE_UPGRADE'
and mt.emd_url not in
     (select emd_url
      from PRE_UPGC_TGT_SW
      where target_type='oracle_emrep')
      and mt.emd_url not in     (select emd_url
                      from mgmt_targets
                     where target_name in (select value
                                      from mgmt_oms_parameters
                                      where name = 'HOST_NAME')
                     )
     and mt.emd_url not in
          (select distinct emd_url
           from mgmt_targets
           where target_name like 'EnterpriseManager%home' or target_name like '%GCD omain_EMGC_OMS%');


·         Delete the unwanted Management Agents:
a.    On the upgraded OMS host, from the OMS home, log in to the EM CLI client. EM CLI Client is available by default with every OMS installation, so you need not install the client separately.
b.       
$<OMS_HOME>/bin/emcli login -username=SYSMAN -password=<sysman-passwd>

c.    Synchronize EM CLI:
d.       
$<OMS_HOME>/bin/emcli sync

e.    Delete the unwanted Management Agents. Here, agentName is the name of the Management Agent you want to delete.
f.        
$<OMS_HOME>/bin/emcli delete_target -name=<agentName> -type=oracle_emd -delete_monitored_targets

For example,

$/u01/software/oracle/middleware/oms/bin/emcli delete_target -name=example.com:4567 -type=oracle_emd -delete_monitored_targets

·         Proceed with the upgrade to 12c Release 5 (12.1.0.5).

Note:

If, for some reason, you are unable to delete the unwanted Management Agents, then turn off the sanity check that checks for Managements Agents with Activation Pending state. This enables you to proceed with the upgrade process without encountering any such warning. To turn off the sanity check, run the following query on your 12c Release 4 (12.1.0.4), 12c Release 1 (12.1.0.3), or 12c Release 2 (12.1.0.2) Management Repository.

MERGE INTO PRE_UPGC_MASTER_INFO DEST
   USING dual
     ON (DEST.property_name =  'ignore_upg_pending_activation_check')
   WHEN MATCHED THEN
     UPDATE SET DEST.property_value = 'TRUE'
   WHEN NOT MATCHED THEN
     INSERT (property_name, property_value) VALUES( 'ignore_upg_pending_activation_check', 'TRUE' );



Before upgrading management server its mandatory to move emkey to repository else we are facing error in middle of installation.  It’s recommended to move emkey to repository where we have to compromise with security where it’s going to unsecure.  We can secure after upgrade.  In this demonstration I will show and fix the error in middle of installation. For more details Click Here.

Here is the demo but I am not going to execute right now, will do between next installer window.

The Oracle base for ORACLE_HOME=/u01/app/oracle/Middleware/oms is /u01/app/oracle/Agent12c/core/12.1.0.4.0

[oracle@oem250 SOFT]$ emctl status emkey
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
The EMKey is configured properly.
[oracle@oem250 SOFT]$
[oracle@oem250 SOFT]$
[oracle@oem250 SOFT]$ emctl config emkey -copy_to_repos
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
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".





To install/upgrade the software binaries of Enterprise Manager Cloud Control Release 5, follow these steps:

Invoke the Enterprise Manager Cloud Control Installation Wizard on the host where your existing OMS is running.

[oracle@oem250 OEM_12c_R5]$ ./runInstaller


(Optional) On the My Oracle Support Details screen, enter your My Oracle Support credentials to enable Oracle Configuration Manager.


If the host from where you are running the installation wizard does not have a connection to the Internet, then enter only the e-mail address and leave the other fields blank. After you complete the installation, manually collect the configuration information and upload it to My Oracle Support.
Click Next.


Click on Upgrade and existing Enterprise Manager System



Click Next.

Select the New Middleware Home as highlighted in below snap.  Can't use existing Middleware Home.  Create a middleware home as OS Level as provide the group and permission according to installing user.



Installer will automatically detect the repository connection descriptor.  You only need to validate the SYS and SYSMAN user.



It will prompt to verify the required patches in the management repository else may face the failure in middle of installation. I have applied PSU 11.2.0.4.6 in our repository database.


SQL> select * from registry$history ;

ACTION_TIME                  ACTION NAMESPA VERSION  COMMENTS            BUND
---------------------------- ------ ------- -------- ------------------- ----
24-AUG-13 12.03.45.119862 PM APPLY  SERVER  11.2.0.4 Patchset 11.2.0.2.0 PSU
21-JUN-15 10.36.25.730156 PM APPLY  SERVER  11.2.0.4 Patchset 11.2.0.2.0 PSU
23-AUG-15 12.09.08.027109 PM APPLY  SERVER  11.2.0.4 PSU 11.2.0.4.6      PSU




After verify Click Next 


Since I have mention about the above "emkey" error.  I am fixing this here right now.  For more details Click Here.


Set the environment for OMS
  


[oracle@oem250 SOFT]$ emctl status emkey
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
The EMKey is configured properly.
[oracle@oem250 SOFT]$
[oracle@oem250 SOFT]$
[oracle@oem250 SOFT]$ emctl config emkey -copy_to_repos
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
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".



Fix the DB prerequisite check failed on management repository.  You can do it manually else by clicking "Yes" installer will automatically fix the error on management database.



Review the Plug-ins to Upgrade then Click Next



Select the additional plug-ins for which is required as per your environment.



On the management server and set the environment for OMS and stop the OMS in order to continue the installation.



Below are the snaps on Management Server....



Provide the Weblogic Server password



Prior to install review the information which you provided in above installation wizard.



Installation Progress details.



After 50 min to 120 min depending upon your server it will prompt for allroot.sh which supposed to run as privilege user (root).



Running allroot.sh



Check the installation summary after allroot.sh and then click close.



Here the upgrade to 12cR5 has successfully completed.  Now login to EM Console to verify the upgraded version.





Verifying Details 

[oracle@oem250 oms]$ emctl status oms
Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is Up


[oracle@oem250 oms]$ emctl status oms -details
Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
Console Server Host        : oem250.ora.com
HTTP Console Port          : 7788
HTTPS Console Port         : 7802
HTTP Upload Port           : 4889
HTTPS Upload Port          : 4903
EM Instance Home           : /u01/app/oracle/gc_inst1/em/EMGC_OMS1
OMS Log Directory Location : /u01/app/oracle/gc_inst1/em/EMGC_OMS1/sysman/log
OMS is not configured with SLB or virtual hostname
Agent Upload is locked.
OMS Console is locked.
Active CA ID: 1
Console URL: https://oem250.ora.com:7802/em
Upload URL: https://oem250.ora.com:4903/empbs/upload

WLS Domain Information
Domain Name            : GCDomain
Admin Server Host      : oem250.ora.com
Admin Server HTTPS Port: 7102
Admin Server is RUNNING

Oracle Management Server Information
Managed Server Instance Name: EMGC_OMS1
Oracle Management Server Instance Host: oem250.ora.com
WebTier is Up
Oracle Management Server is Up

BI Publisher is not configured to run on this host.




[oracle@oem250 oms]$ emctl config emkey -remove_from_repos
Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
The EMKey has already been removed from the Management Repository.
[oracle@oem250 oms]$

No comments:

Post a Comment