Mike Ault's thoughts on various topics, Oracle related and not. Note: I reserve the right to delete comments that are not contributing to the overall theme of the BLOG or are insulting or demeaning to anyone. The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer.

Thursday, October 05, 2006

Reinstalling Oracle10g Grid Control

I recently went on a very nice vacation to Curacao. Before I went on vacation the Oracle 10g Grid Control (10.2.0.2) I had installed on my Laptop for monitoring my home office systems was working. I took my laptop with me to allow offload of pictures from my cameras and to track email while I was away. When I returned home and hooked my laptop back up to my home network Grid Control wouldn’t start and of course even with the excellent (not!) troubleshooting capabilities Oracle has provided for when this happens I was unable to get it to restart leaving me up the creek as to Grid Control.

Ok, so Grid Control is down, simple, just deinstall using the Oracle Universal Installer and reinstall right? I ran OUI and selected the agent and OMS homes for deinstall, the OUI GUI puttered around a bit and then notified me it had successfully removed the selected product. Right, except for directories and registry entries. Ok, so I manually remove the remaining directories and the registry keys and reboot to eliminate the services that OUI didn’t deign to cleanup. Now finally, I can reinstall; no software, no registry entries, no directories and no services to cause me heartache.

So starting up OUI I begin the reinstall of the Grid Control. It gets all the way to the Configure the OMS Repository and then falls over dead with cryptic error screens pointing you to not one but two log files. Believe me the most important is located in: $ORACLE_OMSHOME$\oms10g\sysman\log and will be named something like:
“emca_repos_create.log”. Guess what? OUI also doesn’t remove the SYSMAN (the repository owner) user. Ok, no biggie, I just issue a “DROP USER SYSMAN CASCADE;” command and do a restart.

Oops…OUI now complains that there is a pesky ROLE it wants to recreate…MGMT_USER. Ok, I drop that and restart the repository build. Another 10-15 minutes later it complains about a public synonym that starts with MGMT…so I build a script to drop all public synonyms that begin with MGMT and then restart.

Oops…OUI now complains about another set of synonyms that begins with SMP, so I delete all of them. You guessed it, another restart, another 15 minutes and it complains about public synonym ECM_UTIL, so again I drop the synonyms (only 1 this time) beginning with ECM and restart…finally it completes and goes on to the end.

Here is the script I finally ended up with:

drop user sysman cascade;
drop public synonym MGMT_ADMIN;
drop public synonym MGMT_AS_ECM_UTIL;
drop public synonym MGMT_AVAILABILITY;
drop public synonym MGMT_COLLECTION_PROPERTIES;
drop public synonym MGMT_CREDENTIAL;
drop public synonym MGMT_CURRENT_AVAILABILITY;
drop public synonym MGMT_CURRENT_METRICS;
drop public synonym MGMT_CURRENT_METRIC_ERRORS;
drop public synonym MGMT_CURRENT_SEVERITY;
drop public synonym MGMT_DELTA;
drop public synonym MGMT_DELTA_ENTRY;
drop public synonym MGMT_DELTA_ENTRY_VALUES;
drop public synonym MGMT_DELTA_IDS;
drop public synonym MGMT_DELTA_ID_VALUES;
drop public synonym MGMT_DELTA_VALUE;
drop public synonym MGMT_DELTA_VALUES;
drop public synonym MGMT_GLOBAL;
drop public synonym MGMT_GUID_ARRAY;
drop public synonym MGMT_GUID_OBJ;
drop public synonym MGMT_IP_TGT_GUID_ARRAY;
drop public synonym MGMT_JOB;
drop public synonym MGMT_JOBS;
drop public synonym MGMT_JOB_EXECPLAN;
drop public synonym MGMT_JOB_EXECUTION;
drop public synonym MGMT_JOB_EXEC_SUMMARY;
drop public synonym MGMT_JOB_OUTPUT;
drop public synonym MGMT_JOB_PARAMETER;
drop public synonym MGMT_JOB_SCHEDULE;
drop public synonym MGMT_JOB_TARGET;
drop public synonym MGMT_LOG;
drop public synonym MGMT_LONG_TEXT;
drop public synonym MGMT_MESSAGES;
drop public synonym MGMT_METRICS;
drop public synonym MGMT_METRICS_1DAY;
drop public synonym MGMT_METRICS_1HOUR;
drop public synonym MGMT_METRICS_COMPOSITE_KEYS;
drop public synonym MGMT_METRICS_RAW;
drop public synonym MGMT_METRIC_COLLECTIONS;
drop public synonym MGMT_METRIC_ERRORS;
drop public synonym MGMT_METRIC_THRESHOLDS;
drop public synonym MGMT_NAME_VALUE;
drop public synonym MGMT_NAME_VALUES;
drop public synonym MGMT_PREFERENCES;
drop public synonym MGMT_SEVERITY;
drop public synonym MGMT_SEVERITY_ARRAY;
drop public synonym MGMT_SEVERITY_OBJ;
drop public synonym MGMT_STRING_METRIC_HISTORY;
drop public synonym MGMT_TARGET;
drop public synonym MGMT_TARGETS;
drop public synonym MGMT_TARGET_BLACKOUTS;
drop public synonym MGMT_TARGET_MEMBERSHIPS;
drop public synonym MGMT_TARGET_PROPERTIES;
drop public synonym MGMT_TYPE_PROPERTIES;
drop public synonym MGMT_USER;
drop public synonym MGMT_VIEW_UTIL;
drop public synonym MGMT$DELTA_ORACLE_HOME;
drop public synonym MGMT$DELTA_OS_COMPONENTS;
drop public synonym MGMT$DELTA_OS_COMP_DETAILS;
drop public synonym MGMT$DELTA_OS_KERNEL_PARAMS;
drop public synonym MGMT$DELTA_PATCHSETS;
drop public synonym MGMT$DELTA_PATCHSET_DETAILS;
drop public synonym MGMT$DELTA_TABLESPACES;
drop public synonym MGMT$DELTA_VENDOR_SW;
drop public synonym MGMT$DELTA_VIEW;
drop public synonym MGMT$DELTA_VIEW_DETAILS;
drop public synonym MGMT$ECM_CURRENT_SNAPSHOTS;
drop public synonym MGMT$ECM_VISIBLE_SNAPSHOTS;
drop public synonym MGMT$GROUP_DERIVED_MEMBERSHIPS;
drop public synonym MGMT$GROUP_FLAT_MEMBERSHIPS;
drop public synonym MGMT$GROUP_MEMBERS;
drop public synonym MGMT$HA_BACKUP;
drop public synonym MGMT$HA_FILES;
drop public synonym MGMT$HA_INFO;
drop public synonym MGMT$HA_INIT_PARAMS;
drop public synonym MGMT$HA_MTTR;
drop public synonym MGMT$HA_RMAN_CONFIG;
drop public synonym MGMT$HW_NIC;
drop public synonym MGMT$METRIC_COLLECTION;
drop public synonym MGMT$METRIC_CURRENT;
drop public synonym MGMT$METRIC_DAILY;
drop public synonym MGMT$METRIC_DETAILS;
drop public synonym MGMT$METRIC_HOURLY;
drop public synonym MGMT$MISSING_TARGETS;
drop public synonym MGMT$MISSING_TARGETS_IN_GROUPS;
drop public synonym MGMT$OS_COMPONENTS;
drop public synonym MGMT$OS_FS_MOUNT;
drop public synonym MGMT$OS_HW_SUMMARY;
drop public synonym MGMT$OS_KERNEL_PARAMS;
drop public synonym MGMT$OS_PATCHES;
drop public synonym MGMT$OS_SUMMARY;
drop public synonym MGMT$SOFTWARE_COMPONENTS;
drop public synonym MGMT$SOFTWARE_COMPONENT_ONEOFF;
drop public synonym MGMT$SOFTWARE_COMP_PATCHSET;
drop public synonym MGMT$SOFTWARE_DEPENDENCIES;
drop public synonym MGMT$SOFTWARE_HOMES;
drop public synonym MGMT$SOFTWARE_ONEOFF_PATCHES;
drop public synonym MGMT$SOFTWARE_OTHERS;
drop public synonym MGMT$SOFTWARE_PATCHES_IN_HOMES;
drop public synonym MGMT$SOFTWARE_PATCHSETS;
drop public synonym MGMT$TARGET;
drop public synonym MGMT$TARGET_COMPONENTS;
drop public synonym MGMT$TARGET_COMPOSITE;
drop public synonym MGMT$TARGET_PROPERTIES;
drop public synonym MGMT$TARGET_TYPE;
drop PUBLIC SYNONYM SMP_EMD_AVAIL_OBJ;
drop public synonym EMD_MNTR;
drop public synonym SMP_EMD_AVAIL_OBJ;
drop public synonym SMP_EMD_DELETE_REC_ARRAY;
drop public synonym SMP_EMD_INTEGER_ARRAY;
drop public synonym SMP_EMD_INTEGER_ARRAY_ARRAY;
drop public synonym SMP_EMD_NVPAIR;
drop public synonym SMP_EMD_NVPAIR_ARRAY;
drop public synonym SMP_EMD_STRING_ARRAY;
drop public synonym SMP_EMD_STRING_ARRAY_ARRAY;
drop public synonym SMP_EMD_TARGET_OBJ;
drop public synonym SMP_EMD_TARGET_OBJ_ARRAY;
drop public synonym ECM_UTIL;
drop role mgmt_user;

Now some of the drops may be not needed such as the MGMT$ synonym drops, but I left them in anyway.

So, hopefully if you run into the same issue I did with OEM this little script will help you to get it reinstalled.

5 comments:

Noons said...

:-)
I think it'd have been easier to just recreate the darn instance!
Unreal how flaky that thing is, eh?

Mike said...

For sure. But I was using the same instance to hold my Quest Central repository as well so I couldn't just blow it away and I didn't want a third instance on this laptop...

cobol_abd said...

Hi Mike,

Funny to see I am still learning a lot from you!

Remember me? Marion Merrel Dow, You tought me what Oracle 6 was in Laval Quebec Canada in 1994.

always a pleasure reading you!
André Blanchette

Mike said...

Andre,

Of course I remember! Been a long time! I've moved my technical blog to www.toadworld.com this one has morphed into more of a personal blog.

Jagan A said...

Was trying to reconfig EM after a series of synonym deletions.
But after using your script i still got the same error :(.

But this command has Cleaned up all the repository works for 10g and 11g as well
$ORACLE_HOME/sysman/admin/emdrep/bin/RepManager hostname listener_port sid -action drop

Note id :278100.1

-Jagan