Oracle   发布时间:2022-05-17  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了ORA-12012 ORA-06512 ORACLE_OCM错误 (文档 ID 1615561.1)大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

一套11g 11.2.0.3 rac巡检时发现alert报:

SunMar2506:16:592018
Errorsinfile/oracle/db/diag/rdbms/snms/snms2/trace/snms2_j001_21037068.trc:
ORA-12012:erroronautoexecuteofjob"ORACLE_OCM"."MGMT_CONfig_JOB_2_2"
ORA-29280:invalIDdirectorypath
ORA-06512:at"ORACLE_OCM.MGMT_DB_LL_METRICS",line2436
ORA-06512:atline1

If you have installed Oracle Configuration Manager in a home that contains a database,you must run a script to instrument the database for configuration collection. Whether you are inConnectedordisconnectedmode,youmustrun this script. It will create the database account,ORACLE_OCM. This account stores the PL/sql procedures that collect the configuration information,and the account owns the database management system (DBMS) job that performs the collection. After the account has been set up,it is locked because login privileges are no longer required.

https://docs.oracle.com/cd/E49269_01/doc.12/e48361/ch3_install.htm#CCRIA260

ORACLE_OCM是oracle配置管理的默认帐户。数据库安装完成后默认处于Expired and locked状态。

如果未使用Oracle Configuration Manager解决办法如下:

1.删除或禁用相关job

---删除
sql>execdbms_scheduler.drop_job('ORACLE_OCM.MGMT_CONfig_JOB');
sql>execdbms_scheduler.drop_job('ORACLE_OCM.MGMT_STATS_CONfig_JOB');
sql>selectjob_name,enabledfromdba_scheduler_jobswherejob_namelike'MGMT%';

---禁用
sql>execdbms_scheduler.disable('ORACLE_OCM.MGMT_CONfig_JOB');
sql>execdbms_scheduler.disable('ORACLE_OCM.MGMT_STATS_CONfig_JOB');

2.删除对象Oracle_OCM

sql>dropuserORACLE_OCMcascade;


mos上相关的文档如下:

Database alert_log Shows Error: ORA-12012: error on auto execute of job ORACLE_OCM.MGMT_CONfig_JOB_2_1" And "ORA-29280: invalID directory path" (文档 ID 1615561.1)


Changes

Installing a new database or upgrading a database to a newer release.

Cause

Newer database releases are automatically instrumented for OCM collections. But in some cases,the OCM instrumentation job is trying to write to a "state" directory called "ORACLE_OCM_CONfig_DIR2" which doesn't exist.

To verify if the OCM directorIEs exist or not,run the following as sysdba:

Example:


sql>select * from dba_directorIEs where DIRECTORY_name like '%OCM_CONfig%';
OWNER DIRECTORY_name
------------------------------ ------------------------------
DIRECTORY_PATH
--------------------------------------------------------------------------------
SYS ORACLE_OCM_CONfig_DIR
/u01/app/oracle/product/db11203/ccr/state


In our case,MGMT_DB_LL_METRICS wants to write to ORACLE_OCM_CONfig_DIR2,which is not created by the built-in instrumentation scripts.

Solution

To solve this issue please run the following verification steps.

Step 1. Run the following command to check if OCM is installed / configured or not.

Example of OCM configured


$ORACLE_HOME/ccr/bin/deployPackages -l

Installed Oracle Configuration Manager Packages:
===============================================
Package core,Version: 12.0.0.0.1 - built 10/15/2013 08:14:17 PM
built on x86_64; also supported: amd64,i386
Package engines,Version: 12.0.0.0.0 - built 10/15/2013 08:16:01 PM
built on x86_64; also supported: amd64,i386
Package metricdata,Version: 12.0.0.0.0 - built 10/15/2013 08:16:37 PM
Package ocmcert,Version: 12.0.0.0.0 - built 10/15/2013 08:14:35 PM
built on
Package rda,Version: 8.02.13.12.10 - built 10-Dec-2013 11:50:07
Package rdacelin,Version: 8.02.13.12.10 - built 10-Dec-2013 11:50:07
built on i386; also supported: x86,x86_64,i686,amd64,ia64
Package scripts,Version: 12.0.0.0.1 - built 10/15/2013 08:14:39 PM
built on x86_64; also supported: amd64,i386

Example of OCM not configured

$ORACLE_HOME/ccr/bin/deployPackages -l
The Oracle Configuration Manager state/writeable directory structure is incomplete.
OCM is not configured for this host or ORACLE_CONfig_HOME. Please configure OCM first.

Follow the OCM installation steps given below in Step 2 to properly configure OCM in the Database Oracle Home if not done.

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 the step 2.

Oracle Configuration Manager Installation and Administration Guide

Step 2. Run the following scripts to create the directory and grant the permissions on the directory.

Connect as sysdba

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

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

Depending on OCM and/or Oracle Databases releases the scripts location may change.

Example:

sql> @ORACLE_HOME/rdbms/admin/ocmjb10.sql
sql> @ORACLE_HOME/rdbms/admin/execocm.sql

Step 3. Now verify the directory information:

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

**The Directory ORACLE_OCM_CONfig_DIR2 should be returned in output.

大佬总结

以上是大佬教程为你收集整理的ORA-12012 ORA-06512 ORACLE_OCM错误 (文档 ID 1615561.1)全部内容,希望文章能够帮你解决ORA-12012 ORA-06512 ORACLE_OCM错误 (文档 ID 1615561.1)所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: