Oracle DG Troubleshooting A: ALTER DATABASE recover to logical standby new_logical_dbname stuck

Source: Internet
Author: User

In the process of building a logical repository based on physical standby, we run:

ALTER DATABASE recover to logical standby READDB;

stuck, and alert does not have an error message, extremely depressed, consulted others, chat records such as the following:


Our business is a passport application that cannot be stopped or stopped very troublesome, in short, the medicine can not stop.

After groping, we get an experience: it is necessary to wait until the MRP application log is consistent with the main library, at which point the command will not hang.


The detailed process is probably this:

1. Turn on the real-time log app

ALTER database RECOVER MANAGED STANDBY database USING current LOGFILE DISCONNECT from SESSION
In this process, we are able to view the log application and run the following command in the repository:

SELECT sequence#,applied from V$archived_log ORDER by sequence#;

until the primary and standby logs are consistent, infer SQL such as the following:

Run in Main library:

Archive Log List

running in the Standby library:

Select Max (sequence#) from V$archived_log;

based on these 2 values, you can infer whether the log is consistent


2. Next, we need to stop the MRP process in the repository:

ALTER DATABASE recover managed standby database cancel;

Note that this assumes an error, such as the following see, can not care, because our main log is consistent, MRP can be idle

ERROR at line 1:ora-16136:managed Standby Recovery not active

3. We can then generate the data dictionary in the main library

exec dbms_logstdby.build;

we need to have the data dictionary transferred to the repository, so we still need to log:

Alter system archive log current;

4. Finally, you are done:-)

ALTER DATABASE recover to logical standby READDB;


Good luck!


Oracle DG Troubleshooting A: ALTER DATABASE recover to logical standby new_logical_dbname stuck

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.