ORA-06512: at "ORACLE_OCM.MGMT_DB_LL_METRICS"

一、2014/7/8早上检查数据库的alert日志发现如下报错:
Mon Jul 07 22:00:04 2014
Errors in file /apps/oracle/diag/rdbms/egapdb/egapdb1/trace/egapdb1_j001_28246242.trc:
ORA-12012: error on auto execute of job "ORACLE_OCM"."MGMT_CONFIG_JOB_2_1"
ORA-29280: invalid directory path
ORA-06512: at "ORACLE_OCM.MGMT_DB_LL_METRICS", line 2436
ORA-06512: at line 1
Mon Jul 07 22:05:11 2014
 
trace文件中内容如下:

vi /apps/oracle/diag/rdbms/egapdb/egapdb1/trace/egapdb1_j001_28246242.trc
"/apps/oracle/diag/rdbms/egapdb/egapdb1/trace/egapdb1_j001_28246242.trc" 27 lines, 1023 characters
Trace file /apps/oracle/diag/rdbms/egapdb/egapdb1/trace/egapdb1_j001_28246242.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
ORACLE_HOME = /apps/oracle/product/11.2.0.3/db_1
System name:    AIX
Node name:      egapdb1
Release:        1
Version:        6
Machine:        00F8284F4C00
Instance name: egapdb1
Redo thread mounted by this instance: 1
Oracle process number: 869
Unix process pid: 28246242, image: oracle@egapdb1 (J001)


*** 2014-07-07 22:00:04.620
*** SESSION ID:(642.65245) 2014-07-07 22:00:04.620
*** CLIENT ID:() 2014-07-07 22:00:04.620
*** SERVICE NAME:(SYS$USERS) 2014-07-07 22:00:04.620
*** MODULE NAME:(DBMS_SCHEDULER) 2014-07-07 22:00:04.620
*** ACTION NAME:(MGMT_CONFIG_JOB_2_1) 2014-07-07 22:00:04.620

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

二、此套RAC的OS版本及DB版本狀況:

SQL> select * from v$version; (打了psu5补丁)

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

 
操作系统版本:
uname -a
AIX egapdb1 1 6 00F8284F4C00
三、网上有很多该问题的解决方案。
http://www.linuxidc.com/Linux/2013-01/78399.htm
http://blog.csdn.net/tianlesoftware/article/details/8532090
內容摘錄如下:

Alert log 出现如下错误:
Errors in file /Oracle/11.2.0.3/oracle/diag/rdbms/fssms/fssms2/trace/fssms2_j002_17105234.trc:
ORA-12012: error on auto execute of job "ORACLE_OCM"."MGMT_CONFIG_JOB_2_2"
ORA-29280: invalid directory path
ORA-06512: at "ORACLE_OCM.MGMT_DB_LL_METRICS", line 2436
ORA-06512: at line 1
操作系统: AIX
数据库:11.2.0.3, RAC
这个报错的是ORACLE_OCM的这个用户,这个用户是Oracle 预定义的非管理员用户。 这个在我之前的文章里有说明:
Oracle 用户及角色 介绍  http://www.linuxidc.com/Linux/2013-01/78398.htm
ORACLE_OCM
The account used with Oracle Configuration Manager. This feature enables you to associate the configuration information for the current Oracle Database instance with OracleMetaLink. Then when you log a service request, it is associated with the database instance configuration information.
See Oracle Database Installation Guide for your platform.
Expired and locked
ORACLE_OCM 账户是用来管理Oracle Configuration Manager的。 默认情况下, 该账户是Expired and locked状态。
该错误只出现在OracleRDBMS 11.2.0.3 的版本(新安装的db,或者从其他版本升级到11.2.0.3的),或者Oracle Configuration Manager 的版本大于10.3.3.0.0(opatch lsinventory -detail 可以查看其版本)。
导致这个错误的原因如下:
Newer databasereleases are automatically instrumented for OCM collections. Buthere, the OCM instrumentation job is trying to write to a "state"directory which doesn't yet exists.
当自动执行的job发现目录不存在后,就会报错。
可以用sysdba用户执行如下SQL,来验证OCM db 目录:
SQL> set lin 160
SQL> col owner for a10
SQL> col DIRECTORY_NAME for a25
SQL> col DIRECTORY_PATH for a50
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/11.2.0/dbhome_1/ccr/state
这里只有一个ORACLE_OCM_CONFIG_DIR的目录,而MGMT_DB_LL_METRICS需要写入目录:ORACLE_OCM_CONFIG_DIR2。 但是这个目录在built-in 的instrumentation脚本中并没有创建,所以才会包我们的这个错误。
解决方法1:
执行"ORACLE_HOME/ccr/admin/scripts/installCCRSQL"脚本重新配置OCM collections。
如果没有这个脚本,那么需要先运行"ORACLE_HOME/ccr/bin/setupCCR"脚本来配置OCM。
注意:如果是non-shared文件系统 的RAC 环境,在运行installCCRSQL.sh脚本之前必须先指定变量ORACLE_CONFIG_HOME 到$ORACLE_HOME。 具体可以参考:
OracleConfiguration Manager Installation and Administration Guide
http://docs.oracle.com/cd/E28601_01/doc.1037/e26167/install.htm#CBHFFGFJ
解决方法2:
如果不使用OCM Collector, 可以从数据库中移除OCM的对象。
SQL> drop user ORACLE_OCM cascade;
OCM 是一个独立的工具,移除OCM 不影响数据库其他功能的使用。
如果不删除OCM 的对象,也可以禁用OCM的jobs,命令如下:
execdbms_scheduler.disable('ORACLE_OCM.MGMT_CONFIG_JOB')
exec dbms_scheduler.disable('ORACLE_OCM.MGMT_STATS_CONFIG_JOB')
MOS的文档,把该错误定位成了Bug 13385346:
Bug 13385346 : GCR0 TRACE FILES CONTINUOUSLY CREATED WITHKJGCR_DELETESO MESSAGES
该bug的解决方式是: 忽略生成的错误信息。 该bug在12.1中已经修复。
MOS 参考文档:
"ORA-12012: error on auto execute ofjob ORACLE_OCM.MGMT_CONFIG_JOB_2_1" And "ORA-29280: invalid directorypath" In Database AlertLog [ID 1453959.1]
How To Manually Remove ORACLE_OCM FromDatabase [ID 859113.1]
 
 
四:MOS上与该问题相关NOTE
Bug 13385346 : GCR0 TRACE FILES CONTINUOUSLY CREATED WITHKJGCR_DELETESO MESSAGES
"ORA-12012: error on auto execute ofjob ORACLE_OCM.MGMT_CONFIG_JOB_2_1" And "ORA-29280: invalid directorypath" In Database AlertLog [ID 1453959.1]
How To Manually Remove ORACLE_OCM FromDatabase [ID 859113.1]
 
五:建议按照MOS文档介绍的方案解决ORACLE相关问题
 

你可能感兴趣的:(job,ora-06512,ORA-12012,ORA-29280)