Thursday, March 20, 2008

Errror in Upgrading Oracle Enterprise Manager to Release 3

It's a headache in patching the OEM10g to release 3. More than twice failed when it is updating the repository.

Once the SYSMAN.EMD_MAINTENANCE package error and the upgrade repository failed. Even if manually recreate the database encounter problem when dropping the sysman user.
as in metalink note 433419.1

more emrepmgr.log.839830.errors
9287: ORA-04021: timeout occurred while waiting to lock object SYSMAN.EMD_MAINTE
NANCE
90232: Warning: Package Body created with compilation errors.
491120: ORA-04063: package body "SYSMAN.EMD_MAINTENANCE" has errors
491121: ORA-06508: PL/SQL: could not find program unit being called
491122: ORA-06512: at line 3
530335: ORA-04063: package body "SYSMAN.EMD_MAINTENANCE" has errors
530336: ORA-06508: PL/SQL: could not find program unit being called
530337: ORA-06512: at "SYSMAN.JOB_SUMM_INS_TRIGGER2", line 91
530338: ORA-04088: error during execution of trigger 'SYSMAN.JOB_SUMM_INS_TRIGGE
R2'
530339: ORA-06512: at "SYSMAN.MGMT_JOB_ENGINE", line 10924
530340: ORA-06512: at "SYSMAN.MGMT_JOB_ENGINE", line 650
530341: ORA-06512: at "SYSMAN.MGMT_JOB_ENGINE", line 7987
530342: ORA-04063: package body "SYSMAN.EMD_MAINTENANCE" has errors
530343: ORA-06508: PL/SQL: could not find program unit being called
530344: ORA-06512: at "SYSMAN.JOB_SUMM_INS_TRIGGER2", line 91
530345: ORA-04088: error during execution of trigger 'SYSMAN.JOB_SUMM_INS_TRIGGE
R2'
530346: ORA-06512: at line 95
559591: ORA-04063: package body "SYSMAN.EMD_MAINTENANCE" has errors
559592: ORA-06508: PL/SQL: could no


Error in dropping the sysman.
SQL*Plus: Release 10.1.0.4.0 - Production on Thu Mar 20 16:32:17 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> DROP USER sysman CASCADE;
DROP USER sysman CASCADE
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 5
ORA-04031: unable to allocate 4000 bytes of shared memory ("shared
pool","select /*+ rule */ bucket, e...","Typecheck heap","seg:kggfaAllocSeg")

Finally after few times, and hint from my senior dba .. we need to do the installation checklist before installing.. It's strange that the release notes didn't highlight this..

The metalink note is
422061.1, Installation Checklist for EM 10g Grid Control 10.2.0.x to 10.2.0.3 OMS and Repository Upgrades. Part of it is shown below:-

To speed up the data migration part, a couple of maintenance tasks should be performed on the repository prior to the upgrade.
NOTE: All the statements below should be run as the 'SYSMAN' user (Repository owner).

1. Run the partition maintenance routines
In order to run the partition maintenance routines, the OMS's will have to be stopped.
After all the OMS's have been shutdown, perform the following steps:
    SQL> EXEC emd_maintenance.remove_em_dbms_jobs;

SQL> ALTER SYSTEM SET job_queue_processes=0 SID='*';
SQL> EXEC emd_maintenance.partition_maintenance;
SQL> ALTER SYSTEM SET job_queue_processes=10 SID='*';
SQL> EXEC emd_maintenance.submit_em_dbms_jobs;

2. Clean up all pending-delete ECM snapshots
Delete all pending-delete ECM snapshots, by running these two PL/SQL routines:

    DECLARE

pcb_params MGMT_PURGE_CALLBACK_PARAMS :=
MGMT_PURGE_CALLBACK_PARAMS(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
BEGIN
ecm_ct.DELETE_SNAPSHOTS(pcb_params);
END;
/

DECLARE
pcb_params MGMT_PURGE_CALLBACK_PARAMS :=
MGMT_PURGE_CALLBACK_PARAMS(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
BEGIN
ecm_ct.DELETE_HOST_CONFIG_SNAPSHOTS(pcb_params);
END;
/

3. After running all the cleanup, make sure the statistics on all the repository tables are accurate and up-to-date. Run this procedure to analyze the statistics on the repository tables:
    SQL> EXEC emd_maintenance.analyze_emd_schema('SYSMAN');

Remember to install the patch required before proceeding, mine is
Patch 4329444 SKIP SCAN OF COMPRESSED INDEX ON INDEX-ORGANIZED TABLE (IOT) GIVES WRONG RESULTS














No comments: