Using current logfile will be discarded in Data guard of oracle 12c

Source: Internet
Author: User

The problem originated from a 12c database of the customer and needs to be started to the non-real time apply mode, but the execution is found:
Alter database recover managed standby database cancel;
Alter database recover managed standby database disconnect from session;

After that, the database still works in the real time apply mode.

Go to alertlog and find the answer:

Thu Jun 09 12:16:03 2016
Errors in file/cust/mydb/rdbms/oracle/diag/rdbms/rmydb/mydb/trace/mydb_pr00_24168.trc:
ORA-16037: user requested cancel of managed recovery operation
Thu Jun 09 12:16:03 2016
MRP0: Background Media Recovery process shutdown (mydb)
Thu Jun 09 12:16:04 2016
Managed Standby Recovery Canceled (mydb)
Completed: alter database recover managed standby database cancel
Alter database recover managed standby database disconnect from session <= our usual launch statement
Thu Jun 09 12:16:13 2016
Attempt to start background Managed Standby Recovery process (mydb)
Starting background process MRP0
Thu Jun 09 12:16:13 2016
MRP0 started with pid = 27, OS id = 17971
Thu Jun 09 12:16:13 2016
MRP0: Background Managed Standby Recovery process started (mydb)
Thu Jun 09 12:16:19 2016
Started logmerger process
Thu Jun 09 12:16:19 2016
Managed Standby Recovery starting Real Time Apply <== real time apply is used, and the effect of the preceding statement in 11 GB is that real time apply is used, and the behavior changes in 12c.
Thu Jun 09 12:17:06 2016
Only allocated 127 recovery slaves (requested 128)
Thu Jun 09 12:17:06 2016
Parallel Media Recovery started with 127 slaves
Thu Jun 09 12:17:12 2016
Waiting for all non-current ORLs to be archived...
Thu Jun 09 12:17:12 2016
 
 
Wed Apr 27 14:56:52 2016
MRP0: Background Media Recovery process shutdown (mydb)
Wed Apr 27 14:56:53 2016
Managed Standby Recovery Canceled (mydb)
Completed: alter database recover managed standby database cancel
Alter database recover managed standby database parallel 16 using archived logfile disconnect <= Use using archived log
Wed Apr 27 14:57:29 2016
Attempt to start background Managed Standby Recovery process (mydb)
Starting background process MRP0
Wed Apr 27 14:57:29 2016
MRP0 started with pid = 27, OS id = 23908
Wed Apr 27 14:57:29 2016
MRP0: Background Managed Standby Recovery process started (mydb)
Started logmerger process
Wed Apr 27 14:57:35 2016
Managed Standby Recovery not using Real Time Apply <= can be seen, do not use real time apply!
Wed Apr 27 14:57:38 2016
Parallel Media Recovery started with 16 slaves
Wed Apr 27 14:57:38 2016
Waiting for all non-current ORLs to be archived...
Wed Apr 27 14:57:38 2016
All non-current ORLs have been archived.
Wed Apr 27 14:57:39 2016
Media Recovery Waiting for thread 1 sequence 2287 (in transit)
Completed: alter database recover managed standby database parallel 16 using archived logfile disconnect
At the same time, relevant instructions are also found in the online documentation:

That is, using current logfile has expired. To enable real time apply, you do not need to add this statement. (So whether using current logfile is added or not, real time apply is used .)
To use non-real time apply, you need to use the using archived log.

To sum up:

In 11g, to use real time apply, you need to add using current logfile,
In 12c, if you do not want to use real time apply, you need to add the using archived log, and the using current logfile has expired.
Without the using statement, in 11G, real time apply is not used by default, and in 12c, real time apply is used by default.

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.