ORA-29280: invalid directory path in “mgmt_db_ll_metrics”

After receiving ORA-12012 and ORA-29280 errors in our database alert log relating to packages owned by ORACLE_OCM I did a little digging to determine what the packages were, and how to resolve the issue.

Q: Firstly, what is the ORACLE_OCM schema, and do I need it?

OCM Stands for Oracle Configuration manager and was introduced with Oracle 10g. It is used to "personalize the support experience by collecting configuration information and uploading it to the Management Repository" (according to the Oracle documentation).  More simply, OCM collects details about your database and uploads it to Oracle Support.

Whilst I can see how useful this might be, I have yet to work for a company who think that it's acceptable for the database server to have internet access or who are happy for unaudited information to be communicated to a third party regarding their mission critical systems.

With this in mind, the simple answer in our case was to drop the ORACLE_OCM schema from the database. Problem solved!

drop user ORACLE_OCM cascade;

Q: But I need OCM, how do I fix the problem?

This advice is untested, so please let me know in the comments if this works for you, but the answer is to reinstrument the OCM installation within the database as follows:

# Remove the OCM configuration in the database:
cd $ORACLE_HOME/ccr/bin
./configCCR -r

# Configure the OCM configuration in the database:
./configCCR -a

# Instrument the Database:
cd /ccr/admin/scripts
./installCCRSQL.sh collectconfig -s -r SYS

# Run a manual collection:
cd $ORACLE_HOME/ccr/bin
./emCCR collect