Monday, October 6, 2014

ORA-12012: error on auto execute of job "ORACLE_OCM"."MGMT_CONFIG_JOB_2_3"

Error message

*** 2014-10-05 09:00:07.681
*** SESSION ID:(5646.61909) 2014-10-05 09:00:07.681
*** CLIENT ID:() 2014-10-05 09:00:07.681
*** SERVICE NAME:(SYS$USERS) 2014-10-05 09:00:07.681
*** MODULE NAME:(DBMS_SCHEDULER) 2014-10-05 09:00:07.681
*** ACTION NAME:(MGMT_CONFIG_JOB_2_3) 2014-10-05 09:00:07.681

ORA-12012: error on auto execute of job "ORACLE_OCM"."MGMT_CONFIG_JOB_2_3"
ORA-29280: invalid directory path
ORA-06512: at "ORACLE_OCM.MGMT_DB_LL_METRICS", line 2436
ORA-06512: at line 1



To supress this error message, we have to disable it as per the (https://blogs.oracle.com/UPGRADE/entry/upgrade_to_11_2_0)

SQL> exec dbms_scheduler.disable('ORACLE_OCM.MGMT_CONFIG_JOB');
SQL> exec dbms_scheduler.disable('ORACLE_OCM.MGMT_STATS_CONFIG_JOB');

It has been tried in stage First.

SQL> exec dbms_scheduler.disable('ORACLE_OCM.MGMT_CONFIG_JOB');

PL/SQL procedure successfully completed.

SQL> exec dbms_scheduler.disable('ORACLE_OCM.MGMT_STATS_CONFIG_JOB');

PL/SQL procedure successfully completed.



Another way is to reconfigure this OCM if you want to use this feature.

Cause:

SQL>select * from dba_directories where DIRECTORY_NAME like '%OCM_CONFIG%';

MGMT_DB_LL_METRICS wants to write to ORACLE_OCM_CONFIG_DIR2, which is not created by the built-in instrumentation scripts.

Sotutions:

1. You have to run the below command to check whether OCM is configured.

$ORACLE_HOME/ccr/bin/deployPackages -l

( some time there is a permission issue on $ORACLE_HOME/ccr/bin/deployPackages )
-- Then you can check it and give execute permission to $ORACLE_HOME/ccr/bin/deployPackages
-- Then try again

Installation Steps:

If OCM is not installed, please install it using steps given in the below document. It will create the directory during the installation. NO need to follow step 2.

Oracle Configuration Manager Installation and Administration Guide


2.
Connect as sysdba

SQL> @ORACLE_HOME/ccr/admin/scripts/ocmjb10.sql

SQL> @ORACLE_HOME/ccr/admin/scripts/execute execocm.sql

3.

Output should be like, if everything is fine :

SQL> select * from dba_directories where DIRECTORY_NAME like '%OCM_CONFIG%';

OWNER    DIRECTORY_NAME         DIRECTORY_PATH
-------- ---------------------- ------------------------------------------------------------------
SYS      ORACLE_OCM_CONFIG_DIR2 /u01/app/oracle/product/11.2.0.3/dbhome_1/ccr/state
SYS      ORACLE_OCM_CONFIG_DIR  /u01/app/oracle/product/11.2.0.3/dbhome_1/ccr/hosts/dc2oda-1/state

**Directory ORACLE_OCM_CONFIG_DIR2 should be returned in output.



No comments:

Post a Comment

Command to do active duplicate for Oracle Database

1. First login to target server 2. Validate tns connectivity between Source DB and Target DB 3. Prepare and validate space availability 4. S...