Monday, February 21, 2011

Oracle Configuration Manager

Today i have encountered some errors in the Alert log regarding ORACLE OCM.

ORA-12012: error on auto execute of job 32184
ORA-06550: line ORA-06550: line 1, column 476:
PLS-00201: identifier 'ORACLE_OCM.MGMT_DB_LL_METRICS' must be declared
ORA-06550: line 1, column 476:
PL/SQL: Statement ignored
, column :

Found out that OCM was installed along with the binaries. As we are not using OCM in any of our environments the solution to this problem is as follows:

Steps to uninstall OCM from DB tier:
-------------------------------------------------

1- Set your ORACLE_HOME
export ORACLE_HOME=

2- From your rdbms Oracle Home please connect using sqlplus as sysdba user to your database and run the following commands:

SQL> @ccr/admin/scripts/dropocm.sql;

3- To stop the Scheduler and remove the service or the crontab entry, enter the following command:

$ORACLE_HOME/ccr/bin/deployPackages -d /ccr/inventory/core.jar

4- Delete the ccr directory by entering the following command:

$rm -rf /ccr

5- Verify no services or cron entry. Run the following commands to confirm:
a- ps -ef|grep ccr|grep -v grep
b- crontab -l|grep ccr
c- crontab -l

If you dont find the admin directory under $ORACLE_HOME/ccr then follow the below solution.

Login to that DB with sys and confirm that you have :
"ORACLE_OCM" user exist or not ?
"ORACLE_OCM_CONFIG_DIR" directory exist or not ?

If this user and directory exist In order to manually remove the ORACLE_OCM user and associated objects from database, run:

SQL> drop user ORACLE_OCM cascade;
SQL> drop directory ORACLE_OCM_CONFIG_DIR;

Then also remove the $ORACLE_HOME/ccr directory.

This resolved the issue and couldn't find any more errors in the alert log.

1 comment: