您的位置:首页 > 数据库 > Oracle

Oracle 11.2.0.3 ORA-12012 ORA-29280 ORA-06512 错误 解决方法

2013-12-03 20:52 543 查看
装起这套数据库以来老是发现报这个错误,今天决定解决一下它,

查阅metalink Doc ID 1453959.1

在网上看到了DAVE翻译的文章故转过来,估计以后还是需要用得着。

从ORACLE_OCM用户的描述来看,这个功能我们系统并没有用到,我直接disable两个job。

http://blog.csdn.net/tianlesoftware/article/details/8532090


这个报错的是ORACLE_OCM的这个用户,这个用户是Oracle 预定义的非管理员用户。 这个在我之前的Blog里有说明:

 

Oracle 用户及角色 介绍

http://blog.csdn.net/tianlesoftware/article/details/4786956

 

 
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。

 

导致这个错误的原因如下:

Newer database releases are automatically instrumented for OCM collections. But here, 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]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐