Oracle's dual-machine hot-standby deployment + Switching failure Problem Resolution

Source: Internet
Author: User
Tags switches

Recently implemented a project to use a domestic dual-machine hot-standby products, but in the database to do two-machine hot standby There are some problems, there is no way. Have to study it! After two days of research finally the problem was solved. Record problem-handling steps for later use and hopefully help people who need it.
First,First introduce our environment: two servers + one storage + two dual-machine hot standby software
Second,Dual-Machine Hot standby Workflow: Two servers on the installation of a dual-machine hot standby software, and two servers are mounted storage, dual-machine hot standby software has been monitoring two servers configured on the service items are normal, when monitoring a server on the dual-computer software configured in the service can not start or failure, The dual-machine software automatically switches all services on another server and starts the dual-machine software configuration.
Third,Of course, this article is based on the database of dual-machine hot standby, I will Oracle database of the two-machine building process and problem processing to make a summary
The first step: Mount the storage to two servers (for example, the two servers with the Mount letter E disk);
Step Two: Install Oracle on Server A: Install the Oracle installation files on the D drive, the data files are installed on the storage e-disk, and the Oracle service is set to manual after the installation is complete;
Step three: Turn off Server A and enter Server B: Change the other name of the Oracle data file where Server A is installed on the storage e disk;
Fourth step: Follow the steps in the second step to install Oracle on Server B (note that the installation files and data file paths of Oracle for B and a servers must be identical);
Fifth Step: Configure the Oracle service on the dual-machine hot standby software, and configure a virtual IP for external access, then the application software can only connect to the virtual IP and port to access the database;
The above is the installation process of the Oracle dual-machine, that is, the installation is complete but in fact there is a hidden danger, my side really appeared,
Four,Problem phenomenon: As long as the dual-machine hot standby software switch database then the entire database is down! Unable to start;
Five,Cause of the problem: Since Oracle is running normally on Server A, the Oracle control file has recorded all the state of the database running, and when the Oracle dual machine switches to Server B, Oracle detects that the state of the control file is not the same as the real state of the data file on the storage, then the natural database does not switch to B.
Six,Workaround: Customize the initialization file, and modify the configuration of the custom initial file, so that the control file is loaded on the storage of the control file to keep the control files and data files of the two servers consistent, and to enable both servers to load the database startup of the custom initialization file, as follows:
1. Use PL/SQL dev to execute create pfile= ' C:\INIT. ORA ' from SPFILE; statement, and modify the *.control_files parameter to the control file under the E-disk, copy the generated init.ora to D:\app\mypfile\;

Orcl.__db_cache_size=1946157056orcl.__java_pool_size=67108864orcl.__large_pool_size=16777216Orcl.__oracle_base=\'d:\\app\\administrator\'#ORACLE_BASESet  fromEnvironmentorcl.__pga_aggregate_target=1811939328Orcl.__sga_target=2717908992orcl.__shared_io_pool_size=0orcl.__shared_pool_size=654311424orcl.__streams_pool_size=0*. audit_file_dest=\'d:\\app\\administrator\\admin\\orcl\\adump\'*. audit_trail=\'db\'*. Compatible=\'11.2.0.0.0\'*. control_files=\'e:\\app\\administrator\\oradata\\orcl\\control01.ctl\',\'e:\\app\\administrator\\oradata\\orcl\\control02.ctl\'*. db_block_size=8192*. db_domain=\'\'*.db_name=\'orcl\'*. db_recovery_file_dest=\'d:\\app\\administrator\\flash_recovery_area\'*. db_recovery_file_dest_size=4102029312*. diagnostic_dest=\'d:\\app\\administrator\'*. Dispatchers=\'(PROTOCOL=TCP) (service=orclxdb) \'*. memory_target=4518313984*. open_cursors= -*. processes= Max*. remote_login_passwordfile=\'exclusive\'*. undo_tablespace=\'undotbs1\'

2, write SQL script Test.sql and put the script to D:\app\mypfile\, content:

/  as SYSDBA shutdown Immediatestartup pfile =\'d:\\app\\mypfile\\init.ora\'; exit;

3, write batch script test.bat, content:

/ @D: \\app\\mypfile\\test.sql

4, this time in the dual-machine hot standby software to add Test.bat before Oracle startup, so that the problem solved;

Oracle's dual-machine hot-standby deployment + Switching failure Problem Resolution

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.