Friday, October 7, 2011

How to Upgrade Oracle Enterprise Manager Grid Control Release 10.2.0.1 to 10.2.0.4

In the name of Allah, Most Gracious, Most Merciful.

In this article i will describe "How to upgrade Oracle Enterprise Manager Grid Control Release 10.2.0.1 to 10.2.0.4" on Red Hat Linux 5.3 OS. For this you have to download patch number 3731593 from Oracle Metalink site.

1. Stop Management Agent, Management Services, Repository Database and Repository Database Listener.

$ <AGENT_HOME>/bin/emctl stop agent
$ <OMS_HOME>/opmn/bin/opmnctl stopall
$ <ORACLE_HOME>/bin/sqlplus / as sysdba
  shutdown immediate;
  exit;

$ <ORACLE_HOME>/bin/lsnrctl stop

2. Backup OMS Home Directory, Repository Database and Oracle Inventory Directory.

3. Start repository database and its listener.

$ lsnrctl start
$ sqlplus / as sysdba
  startup;


4. If you are using Corrective Action Feature then you have to execute following code. First verify it by logging on with repository owner i.e. sysman


select count(*) from mgmt_corrective_action;

if this query returns a value greater then 0 then execute following block.

BEGIN
   FOR r IN (SELECT job_id
        FROM   mgmt_corrective_action a
        WHERE  NOT EXISTS
        (SELECT 1
        FROM   mgmt_job j
        WHERE  j.job_id = a.job_id)
        ) LOOP
     UPDATE mgmt_policy_assoc_cfg c
       SET crit_action_job_id = NULL
     WHERE  crit_action_job_id = r.job_id
     ;
     UPDATE mgmt_policy_assoc_cfg c
       SET warn_action_job_id = NULL
     WHERE  warn_action_job_id = r.job_id
     ;
     UPDATE mgmt_policy_assoc_cfg c
       SET info_action_job_id = NULL
     WHERE  info_action_job_id = r.job_id
     ;
     DELETE
     FROM   mgmt_corrective_action
     WHERE  job_id = r.job_id
     ;
     COMMIT;
   END LOOP;
  COMMIT;
END;
/

5. set ORACLE_HOME to OMS home directory

$ export ORACLE_HOME=/u01/oracle/product/10.2.0/grid/oms10g

6. unzip the patch zip file to /tmp directory

$ unzip p3731593_10204_LINUX.zip

7. Run Installer from patch

$ /tmp/3731593/Disk1/runInstaller

Figure - 1

Select OMS home name and patch from list and click Next button.

Figure - 2

Click Next button.

Figure - 3

Enter the sys password for the repository database and click Next.

Figure - 4

Click Next.

Figure - 5

Review summary and click Next.

Figure - 6

View progress.

Figure - 7

View progress.

Figure - 8

Repository upgrade is in progress.

Figure - 9

View progress.

Figure - 10

View progress.

Figure - 11

Oracle Enterprise Manager Grid Control Release 10.2.0.1 is upgraded to 10.2.0.4

Insha-Allah this will help and serve the purpose. For any corrections and improvements please suggest.



No comments:

Post a Comment