Oracle for Linux dual-Host Control File Error

Source: Internet
Author: User

Linux: RHEL 6.3 Oracle: oracle 11g R2 (11.2.0.3)

RHEL 6.3 is installed on two servers, oracle is installed on two servers, software is stored locally on the server, and database files are stored on the shared disk (iscsi used ), the first oracle installation is complete and the test is successful. Then, delete or rename the database file from the shared disk, and then install the second oracle instance. The database file is placed on the shared disk for use by two oracle instances. The test is successful on the second platform.

By default, oracle installation has two control files, one in the shared disk (control01.ctl) and the other under $ ORACLE_BASE/fast_recovery_area/(control02.ctl ). When the second oracle is installed, there is no problem with the test, and then switch the shared disk to the first oracle, you can start the instance, but not mount, prompt ORA-00214 error, in fact, the version of the control file is inconsistent. Then, overwrite the control01.ctl of the shared disk with the first local $ ORACLE_BASE/fast_recovery_aera/control02.ctl, And then mount the database, however, when switching to the second server, the same problem is still the first server. The control01.ctl of the shared disk overwrites control02.ctl and you can mount it! Therefore, for dual-host systems, oracle control cannot be placed locally and must be placed on a shared disk.

I tried to directly modify the parameter file (init. the control_files of ora) cannot always take effect. Therefore, instead of modifying the path strength of the control file through the static parameter file, you can create a spfile to change control_files.

1. Shut down oracle (shutdown immediate)

2. Copy init. ora to an oracle. ora file under $ ORACLE_BASE/admin/SID/pfile. (Init. ora and oracle. all the parameters and path strength of ora are the same), and then use vim oracle. ora, modify oracle. the ora file controls the path strength of the file in control_files and changes it as needed. However, all the control files must be placed in the shared drive path.

3. conn/as sysdba

> Startup pfile = "$ ORACLE_BASE/admin/SID/pfile/oracle. ora ". In this way, the oracle database can be started using the oracle. ora parameter. You can use select * from v $ controlfile to view the path strength of the control file.

4.> create spfile from pfile = '$ ORACLE_BASE/admin/SID/pfile/oracle. ora '. In this way, a spfile is generated. You can specify the path strength after the spfile. The default value is $ ORACLE_HOME/dbs/spfileSID. ora.

5. In the same way, generate a spfile.

Backup control file: SQL> alter database backup controlfile to trace;

At this time, the SID_ora _ *. trc file will be generated in the udump directory. This file contains the creation Control File Script, which is generally divided into archive mode and non-archive mode.

View the oracle parameter file, control file, data file, and log file location:

Parameter file: SQL> show parameter spfile;

Other parameter files are also located at: $ ORACLE_HOME/dbs/

The network parameter file is located at $ ORACLE_HOME/network/admin.

Control File: SQL> select * from v $ controlfile;

Data File: SQL> select FILE_NAME from dba_data_files;

Log File: SQL> select * from v $ logfile;

Control File: SQL> show parameter

Order of file loading during oracle startup: spfileSID. ora --> spfile. ora --> initSID. ora --> init. ora

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.