Oracle Data Guard (4) Failover

Source: Internet
Author: User

Oracle Data Guard (iv) Failover 1. check for missing logs in the Standby database. Run the following command to check for missing logs: SQL> select thread #, log_sequence #, high_sequence # from v $ archive_gap; copy the missing log file from the primary database to the log directory specified by the standby database, and run the following command to register it in the standby database: SQL> alter database register physical logfile 'filespec1'; 2. stop the log application process on the Standby database SQL> alter database recover managed standby database cancel; SQL> alter database recover managed standby database f Inish; if you encounter an error when applying all redo logs, run the following command to execute failover: SQL> alter database activate physical standby database; 3. check the Standby database status SQL> select switchover_status from v $ database; Role Switching can be performed only when the status is "TO PRIMARY" or "SESSIONS ACTIVE. 4. switch Standby database to Primary role SQL> alter database commit to switchover to primary with session shutdown; SQL> alter database open; 5. fix the issue where the Primary database obtains the SCN: SQL> select to_char (standby_became_primary_scn) from v $ database of the standby database of the new Primary role. Restore the database of the Primary to the SCN obtained above: RMAN> RUN {Set until scn <standby_became_primary_scn + 1>; Restore database; Recover database;} switch primary database to physical standby role: SQL> alter database Covert to physical standby; SQL> shutdown immediate; SQL> startup mount; Enable read-only log file synchronization and restart: SQL> alter database open read only; SQL> shutdown immediate; SQL> startup mount; enable the log application process on the primary database: SQL> alter database recover managed standby database using current logfile disconnect; in addition, you can rebuild the Primary database from the backup of the standby database of the current primary role, or repeat the standby execution process and re-build the primary database through the RMAN script.

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.