Switch among the three Protection modes of DGbroker and the protection mode of dgbroker

Source: Internet
Author: User

Switch among the three Protection modes of DGbroker and the protection mode of dgbroker

1. Three protection Modes

-Maximum protection

In Maximum protection, the slave database and master database data are exactly the same, so that zero data loss transactions are committed on both sides of the master and slave databases. If the slave database goes down or the network is faulty, the master database cannot communicate, and the master database goes down immediately. This method has the highest protection level. However, this mode has a great impact on the performance of the master database and requires high-speed network connections.

-Maximum availability

In Maximum availability mode, if the connection to the slave database is normal, the running mode is equivalent to Maximum protection mode, and the transaction is committed simultaneously by the master and slave databases. If the slave database loses contact with the master database, the master database is automatically switched to Maximum performance mode to ensure Maximum availability of the master database.

-Maximum performance

In Maximum performance, the master database transfers the archived log to the slave database through the arch process. In this way, the master database has the highest running performance, but cannot guarantee that data is not lost, the lost data is affected by the size of the redo log. When the redo log is too large, one log may not be archived in one day. You can manually switch the log to reduce data loss.

2. Switch Mode (Maximum performance to Maximum availability)

A. view the Protected Mode

Query DGbroker:

DGMGRL> show configuration  verbose;Configuration - dgc  Protection Mode: MaxPerformance  Databases:    atest1 - Primary database    atest2 - Physical standby database  Properties:    FastStartFailoverThreshold      = '30'    OperationTimeout                = '30'    FastStartFailoverLagLimit       = '30'    CommunicationTimeout            = '180'    ObserverReconnect               = '0'    FastStartFailoverAutoReinstate  = 'TRUE'    FastStartFailoverPmyShutdown    = 'TRUE'    BystandersFollowRoleChange      = 'ALL'    ObserverOverride                = 'FALSE'    ExternalDestination1            = ''    ExternalDestination2            = ''    PrimaryLostWriteAction          = 'CONTINUE'Fast-Start Failover: DISABLEDConfiguration Status:SUCCESS

Sqlplus View:

SQL> select database_role,protection_mode,protection_level from v$database;DATABASE_ROLE     PROTECTION_MODE      PROTECTION_LEVEL---------------- -------------------- --------------------PRIMARY      MAXIMUM PERFORMANCE  MAXIMUM PERFORMANCE

B. view the log transmission mode of the standby database (parameter LogXptMode (sync: synchronous transmission/async: asynchronous transmission ))

DGMGRL> show database verbose 'atest2';Database - atest2  Role:            PHYSICAL STANDBY  Intended State:  APPLY-ON  Transport Lag:   0 seconds (computed 1 second ago)  Apply Lag:       0 seconds (computed 1 second ago)  Apply Rate:      97.00 KByte/s  Real Time Query: ON  Instance(s):    atest  Properties:    DGConnectIdentifier             = 'atest2'    ObserverConnectIdentifier       = ''    LogXptMode                      = 'sync'    DelayMins                       = '0'    Binding                         = 'optional'    MaxFailure                      = '0'    MaxConnections                  = '1'    ReopenSecs                      = '300'    NetTimeout                      = '30'    RedoCompression                 = 'DISABLE'    LogShipping                     = 'ON'    PreferredApplyInstance          = ''    ApplyInstanceTimeout            = '0'    ApplyParallel                   = 'AUTO'    StandbyFileManagement           = 'AUTO'    ArchiveLagTarget                = '0'    LogArchiveMaxProcesses          = '4'    LogArchiveMinSucceedDest        = '1'    DbFileNameConvert               = ''    LogFileNameConvert              = ''    FastStartFailoverTarget         = ''    InconsistentProperties          = '(monitor)'    InconsistentLogXptProps         = '(monitor)'    SendQEntries                    = '(monitor)'    LogXptStatus                    = '(monitor)'    RecvQEntries                    = '(monitor)'    ApplyLagThreshold               = '0'    TransportLagThreshold           = '0'    TransportDisconnectedThreshold  = '30'    SidName                         = 'atest'    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(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, change it to sync.

DGMGRL> edit database atest1 set property logxptmode=sync;Property "logxptmode" updated

D. Confirm the value of LogXptMode after the modification, as shown in step B.

E. Switch Mode (if the switch fails, confirm the value of LogXptMode in the standby database again)

DGMGRL> edit configuration set protection mode as maxavailability;Succeeded.

F. Confirm the database protection mode, as shown in step.

G. Note that the sync modified in Step c is the value of the slave database. Remember!

3. Personal summary:

A. the three modes can be switched freely in DGbroker (using step 2) (in the test database). Normally, the database can quickly respond (when viewing the protection mode ).

B. When Maximum performance is used, set the LogXptMode parameter (slave database) to async/

C. When using Maximum protection or Maximum availability, set the parameter (slave database) LogXptMode to sync.

D. (tested) when Maximum protection is used, when the standby database encounters an exception (such as network problems or database downtime), the master database suspends (the alarm log reports the following error ), when the standby database recovers, the primary database recovers.

LGWR: Error 1034 attaching to RFS for reconnect

E. when Maximum protection is used, when the standby database encounters an exception, when the primary database is suspended, the (primary database) can be forcibly switched to Maximum performance, however, when you switch back to Maximum protection (when the slave database recovers), the master database must be restarted.

DGMGRL> edit configuration set protection mode as maxprotection;Operation requires shutdown of instance "atest" on database "atest1"Shutting down instance "atest"...Unable to connect to databaseORA-12545: Connect failed because target host or object does not existFailed.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"

 

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.