Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle OCM Job running error ORA-29280

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Oracle OCM job running error ORA-29280

A minor glitch occurred in a colleague's system, and the author helped to check it. Because the overall load of the system is very low, there is no obvious function influence point, and the author has no intuitive idea. Generally speaking, from the alert log, we can view the important problem phenomena of Oracle according to the time relationship.

From the log situation, however, a number of other issues were identified.

Mon Jun 02 22:00:08 2014

Errors in file /u01/app/oracle/diag/rdbms/dt/MM/trace/MM_j001_43954.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

During the operation of the system database, this error will appear at 22 o 'clock every night. The system load is low (log switching is not frequent), and otherwise there are no obvious errors.

22 o'clock is an important time point for Oracle. After entering 10g, Oracle will automatically schedule some maintenance jobs at night to ensure the smooth and efficient operation of the database. The most famous of these jobs is the automatic statistics collection job, which collects statistics on new objects or objects that change frequently at night.

After entering 11g, this night operation mechanism has been continuously strengthened, but the execution time window has changed, and the starting time has been adjusted to 22:00 at night. The error we see in the logs is one of the jobs that Oracle OCM (Oracle Configuration Manager) executes at night.

OCM is a working component within Oracle that provides configuration parameters to assist in the work. After we install the database, we will see that the user schema list includes a username named ORACLE_OCM, which is the internal corresponding data user collection of this component.

According to Oracle MOS, such errors occur due to imperfections in the Oracle database upgrade process. During the OCM instrument process, information is automatically written to a number of directory locations. If there is a problem with the directory configuration, an error will be reported.

In general systems, we can also see these default directories.

SQL> select directory_name, directory_path from dba_directories;

DIRECTORY_NAME DIRECTORY_PATH

------------------------------ --------------------------------------------------------------------------------

XMLDIR /u01/app/oracle/rdbms/xml

ORACLE_OCM_CONFIG_DIR /u01/app/oracle/ccr/hosts/SimpleLinux.localdomain/state

DATA_PUMP_DIR /u01/app/admin/ora11g/dpdump/

ORACLE_OCM_CONFIG_DIR2 /u01/app/oracle/ccr/state

In many cases, the ORACLE_OCM_CONFIG_DIR2 directory is where some data is written. If this directory configuration is faulty or does not exist, a job error will occur.

Knowing the cause of the problem makes it easier to solve it. Handle metadata corruption the same way as other metadata corruptions, either by executing an installation script, reinstalling the component, or disabling the component.

The following are the method steps for OCM directory configuration. Note: Due to environmental constraints, the author did not conduct actual testing, the following scripts in a third-party environment.

First run the script to check the OCM configuration installation.

[oracle@SimpleLinux ~]$ cd $ORACLE_HOME/ccr/bin

[oracle@SimpleLinux bin]$ ls -l | grep deploy

-rw-r--r--. 1 oracle oinstall 48758 Jun 5 2013 deployPackages

[oracle@SimpleLinux bin]$ chmod 755 deployPackages

[oracle@SimpleLinux 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.

According to the prompt of the author's environment, OCM is not configured in the author's server. If it is configured, it will display the prompt content such as Step 2.

The second step is to execute scripts to create OCM directory objects and grant permissions.

SQL> conn / as sysdba

Connected.

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

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

Finalize directory creation.

SQL> select directory_name, directory_path from dba_directories where DIRECTORY_NAME like '%OCM_CONFIG%';

DIRECTORY_NAME DIRECTORY_PATH

------------------------------ --------------------------------------------------------------------------------

ORACLE_OCM_CONFIG_DIR /u01/app/oracle/ccr/hosts/SimpleLinux.localdomain/state

ORACLE_OCM_CONFIG_DIR2 /u01/app/oracle/ccr/state

Note: DIR2 is required to exist.

The second method is simpler, if you determine that the system does not need OCM to run, you can shut down the job execution. After all, it's better to do less than more. Of course, this requires confirmation that the system does not need OCM to operate.

Delete the ORACLE_OCM user schema or disable job jobs.

exec dbms_scheduler.disable('ORACLE_OCM.MGMT_CONFIG_JOB')

exec dbms_scheduler.disable('ORACLE_OCM.MGMT_STATS_CONFIG_JOB')

This case is not difficult to solve, but tell us one thing: the maintenance process of the system, if all aspects. It is important to check the system operation log regularly to find potential problems and solve them in time. Let the database "with injuries" run, the future will bring some unexpected problems.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report