Dgbroker Three protection modes for Oracle database _oracle

Source: Internet
Author: User

1. Three modes of protection

–maximum Protection

Under maximum protection, you can ensure that the data from the library and the main library is exactly the same, and that the zero data loss. The transaction is completed at the same time on both sides. If from the library downtime or network problems, master and slave library can not communicate, the main library also immediately down. In this way, it has the highest level of protection. However, this pattern has a great impact on the main library performance, requiring high-speed network connectivity.

–maximum availability

In maximum availability mode, if the connection from the library is normal, the operation mode is equal to the maximum protection mode, and the transaction is also submitted by the master-slave library. If you lose contact from the library and the main library, the main library automatically switches to maximum performance mode to ensure maximum availability of the master library.

–maximum Performance

In maximum performance, the main library passes the archived archived log through the arch process to the library, in which case the main library runs the highest performance but does not guarantee that the data is not lost and that the lost data is affected by the size of the redo log. In the case of redo log is too large, may not archive a log one day, you can manually change the way the log to reduce the loss of data.

2. Mode switching (Maximum performance switch to Maximum availability)

A. View the protected mode

 Dgbroker View:

Dgmgrl> show configuration verbose;
CONFIGURATION-DGC
 Protection mode:maxperformance
 Databases:
 atest1-primary database
 atest2- Physical Standby Database
 Properties:
 faststartfailoverthreshold = ' = '
 operationtimeout    = ' '
 faststartfailoverlaglimit  = '
 communicationtimeout = ' 180 '
 observerreconnect    = ' 0 '
 Faststartfailoverautoreinstate = ' true '
 Faststartfailoverpmyshutdown = ' true '
 bystandersfollowrolechange  = ' All '
 Observeroverride    = ' FALSE '
 ExternalDestination1   = '
 ExternalDestination2   =
 ' Primarylostwriteaction   = ' CONTINUE '
fast-start failover:disabled
Configuration Status:
SUCCESS 

Sqlplus View:

Sql> select Database_role,protection_mode,protection_level from V$database;
Database_role  protection_mode  protection_level
--------------------------------------------------- -----
PRIMARY  

B. View the log transfer mode of the standby (Logxptmode (sync: Synchronous transmission/async: Asynchronous transfer))

Dgmgrl> Show Database verbose ' atest2 '; Database-atest2 role:physical STANDBY intended state:apply-on transport lag:0 seconds (computed 1 second ago) A pply lag:0 seconds (computed 1 second ago) Apply rate:97.00 kbyte/s Real Time Query:on Instance (s): Atest Proper
 Ties:dgconnectidentifier = ' atest2 ' observerconnectidentifier = ' Logxptmode = ' sync ' delaymins = ' 0 ' Binding = ' optional ' maxfailure = ' 0 ' maxconnections = ' 1 ' reopensecs = ' nettimeout ' = ' 
 ' redocompression = ' DISABLE ' logshipping = ' on ' preferredapplyinstance = ' applyinstancetimeout = ' 0 '
 Applyparallel = ' auto ' standbyfilemanagement = ' auto ' Archivelagtarget = ' 0 ' logarchivemaxprocesses = ' 4 ' Logarchiveminsucceeddest = ' 1 ' dbfilenameconvert = ' Logfilenameconvert = ' Faststartfailovertarget = ' I Nconsistentproperties = ' (monitor) ' Inconsistentlogxptprops = ' (monitor) ' Sendqentries = ' (MOnitor) ' Logxptstatus = ' (monitor) ' recvqentries = ' (monitor) ' Applylagthreshold = ' 0 ' Transportlagthreshol D = ' 0 ' transportdisconnectedthreshold = ' sidname ' = ' atest ' staticconnectidentifier = ' (description= (ADDR Ess= (PROTOCOL=TCP) (host=vijay02.database.com) (port=1521) (Connect_data= (SERVICE_NAME=ATEST2_DGMGRL) (INSTANCE_
 Name=atest) (server=dedicated))) ' standbyarchivelocation = '/u01/app/oracle/oradata/atest/archivelog ' AlternateLocation = ' Logarchivetrace = ' 0 ' Logarchiveformat = '%t_%s_%r.dbf ' topwaitevents = ' (monitor) 

 ' Database status:success

C. If the value of Logxptmode is async, modify it to sync

dgmgrl> Edit Database Atest1 set property logxptmode=sync;

D. Confirm the Logxptmode value again after the modification, such as step b

E. Switch mode (if the switch fails, then confirm the Logxptmode value of the standby)

Dgmgrl> Edit Configuration set protection mode as maxavailability;
Succeeded.

F. Confirm the protection mode of the database, such as step a

G. Note that the sync you modified in step c is the value of the Repository, remember!

3. Personal Summary:

A. Three modes can be freely switched in Dgbroker (using step 2) (in the test library), and normally the database can react quickly (when viewing the protection mode).

B. When using the maximum performance, the parameter (standby) Logxptmode set to Async.

C. When using maximum protection or maximum availability, the parameters (standby) Logxptmode to be set to sync.

D. (tested) When using maximum protection, when there are exceptions (such as network problems, database downtime), the main library hangs (the alarm log will report the following error), when the standby is restored to normal, the main library will also be restored.

Lgwr:error 1034 attaching to RFS for reconnect

E. When the Maximum protection is used, the primary library can be forced to switch to the Maximum performance when the main repository is suspended when the standby is abnormal, but when the Maximum protection (when the standby is restored) is reset, the main library needs to be restarted.

Dgmgrl> Edit Configuration set protection mode as maxprotection;
Operation requires shutdown of instance "atest" on the Database "Atest1"
shutting down instance "Atest" ...
Unable to connect to database
Ora-12545:connect failed because the target host or object does not exist
.
Warning:you are no longer connected to ORACLE.
Please complete the following steps to finish the operation:
 shut down instance "atest" of Database "Atest1"
 start Up instance "atest" of Database "Atest1"

The above content is small to share the Oracle database Dgbroker three kinds of protection mode of the relevant content of the switch, I hope you like, but also thank you all have been on the cloud Habitat community site support and love.

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.