Resolution record of two Oracle configuration problems

Source: Internet
Author: User

Resolution record of two Oracle configuration problems

Whether installed or running, the Oracle database involves various relationships with peripheral software and hardware. To smoothly install and run a healthy database system, you must adjust the configuration of peripheral components. If a problem exists in a certain aspect, some problems may occur in the process of taking it for granted.

This article records the two problems that have been encountered recently, and records them to stay in the future.

-------------------------------------- Split line --------------------------------------

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

-------------------------------------- Split line --------------------------------------

1. Oracle OCM job run error ORA-29280

If a minor fault occurs in a colleague's system, I will help you check it. Because the overall load of the system is very low and there is no obvious functional impact, I do not have an intuitive idea. In general, from the alert log, we can view important Oracle problems according to the time relationship.

Some other problems are found in logs.

Mon Jun 02 22:00:08 2014

Errors in file/u01/app/oracle/diag/rdbms/dt/MM/trace/mm_j0042443954.trc:

The 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 System database operation, this error occurs at every night. The system load is very low (log switching is not frequent) and there are no obvious errors.

Is an important time point for Oracle. After Entering 10 Gb, Oracle will automatically schedule maintenance jobs at night to ensure the smooth and efficient operation of the database. Among these jobs, the most famous is the automatic statistic collection job, which collects data statistics for new objects or frequently changed objects at night.

After entering 11g, this nighttime job mechanism is constantly being strengthened, but the execution time window has changed and the start time is adjusted. The error we see in the log is one of the jobs executed by Oracle OCM (Oracle Configuration Manager) at night.

OCM is a working Component in Oracle that provides some configuration parameter assistance. After installing the database, we can see that the user schema list contains a username named ORACLE_OCM, which is the internal data user set of this component.

According to Oracle MOS, this error is caused by incomplete Oracle database upgrades. During the measurement process of OCM, information is automatically written to some directory locations. If the directory configuration is incorrect, an error is 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/Cr/hosts/SimpleLinux. localdomain/state

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

ORACLE_OCM_CONFIG_DIR2/u01/app/oracle/Cr/state

In many cases, some data is written to the ORACLE_OCM_CONFIG_DIR2 directory. If the directory configuration is incorrect or does not exist, a job error may occur.

After understanding the cause of the problem, it is easier to solve the problem. Similar to other methods for dealing with metadata corruption, You can execute installation scripts, reinstall components, or disable component running.

The following describes how to configure the OCM directory. Note: Due to environment limitations, I did not perform actual tests. The following scripts are performed in a third-party environment.

First, run the script to check the OCM configuration and installation.

[Oracle @ SimpleLinux ~] $ Cd $ ORACLE_HOME/ccr/bin

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

-Rw-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 my environment prompts, the OCM is not configured on my server. If it is configured, the prompt content shown in step 2 is displayed.

Step 2: Execute the script to create an OCM directory object and grant permissions.

SQL> conn/as sysdba

Connected.

@ ORACLE_HOME/Cr/admin/scripts/ocmjb10. SQL

@ ORACLE_HOME/Cr/admin/scripts/execute execocm. SQL

Finally, confirm the 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/Cr/hosts/SimpleLinux. localdomain/state

ORACLE_OCM_CONFIG_DIR2/u01/app/oracle/Cr/state

Note: DIR2 is required to exist.

The second method is simpler. If you confirm that the system does not require OCM to run, you can close the job. After all, there is nothing more to do with it. Of course, we need to confirm that the system does not need OCM to run.

Delete ORACLE_OCM user schema or disable a job.

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 it tells us that the maintenance process of the system should be comprehensive. It is important to regularly view system operation logs to promptly discover potential problems and solve problems. This will cause unexpected problems in the future.

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.