Showing posts with label Dataguard. Show all posts
Showing posts with label Dataguard. Show all posts

Thursday, 25 April 2019

Important Data Guard Process

Remote File Server (RFS) Process:
The RFS process runs on the standby database and is responsible for communication between the primary and the standby database. For the log transport service, the RFS on the standby database receives the redo records from the archiver or the log writer process of the primary database over Oracle Net and writes to the filesystem on the standby site.

Fetch Archive Log (FAL):
The FAL process has two components: FAL Client and FAL Server. Both processes are used for archive gap resolution. If the Managed Recovery Process (MRP) on the standby database site detects an archive gap sequence, it initiates a fetch request to the FAL client on the standby site. This action, in turn, requests the FAL server process on the primary database to re-transmit the archived log files to resolve the gap sequence. Archive gap sequences will be discussed later in this chapter.
Once the log transport service completes the transmission of redo records to the standby site, the log apply service starts applying the changes to the standby database. The log apply service operates solely on the standby database. The following processes on the standby site facilitate the log apply operations.

Managed Recovery Process (MRP):
The MRP  applies the redo entries from the archived redo logs onto the physical standby database.

Logical Standby Process (LSP):
The LSP applies the redo records from archived redo logs to the logical standby database. The Oracle database log miner engine is used by the logical standby process for the SQL apply operations. Using the log miner engine, the LSP process recreates the SQL statements from redo logs that have been executed on the primary database. These statements are then applied to the standby database to keep it current with the primary database.

Data Guard background processes:
In a Data Guard configuration, we can see some Oracle Data Guard specific background processes in both, primary and standby databases. These processes perform the operations of redo transport and apply services. Data Guard broker also has some specific background processes. We can see the description and duties of the most important Data Guard processes as follows:

MRP0 (Managed Standby Recovery Process): 
 coordinates the read and apply process of redo in a physical standby database.

RFS (Remote File Server):
Is responsible for receiving the redo data, which is sent by the primary database to the standby database.

LSP0 (Logical Standby Coordinator Process):
Coordinates the SQL Apply processes, which are the mining processes and apply processes.

LSP1 (Logical Standby Dictionary Build Process):
Is used on the logical standby databases when a switchover or failover is in action.

LSP2 (Logical Standby Set Guard Process):
Is used to operate Database Guard settings. Database Guard specifies which objects will be protected for modification in a logical standby database.

NSAn (Redo Transport NSA1 Process):
Is used on the primary database to ship redo data to the standby database when ASYNC mode is being used. There may be multiple NSA processes such as NSA1 and NSA2.

NSSn (Redo Transport NSA1 Process):
Is also used on the primary database to ship redo data to the standby database. However, only when the SYNC mode is being used.

DMON (Data Guard Broker Monitor Process):
runs on every instance in a Data Guard broker configuration. It communicates with local database and DMON processes of the remote databases. The broker-related requests and the monitoring information are transferred on this communication channel.

FSFP (Data Guard broker fast-start failover pinger process):
Is used for the management of fast-start failover status.

Wednesday, 24 April 2019

DataGuard Issues

DataGuard Issues


1):

 Warning: ORA-16826: apply service state is inconsistent with the DelayMins property

Workaround:

Check DG configuration:

DGMGRL> show configuration

Configuration - ZEE_DG_CONFIG

  Protection Mode: MaxPerformance
  Databases:
    zee   - Primary database
    zeedr - Physical standby database
      Warning: ORA-16826: apply service state is inconsistent with the DelayMins property

Fast-Start Failover: DISABLED

Configuration Status:

WARNING


Check on Which node MRP process is running.

On Standby

Make sure  Standby redo logs files are created on standby.

Please refere < Doc ID 249703.1> for the same.


DGMGRL> edit database <STANDBY DB> set state=apply-off;

DGMGRL> edit database <STANDBY DB> set state=apply-on;

OR

SQL>alter database recover managed standby database cancel;

SQL> alter database recover managed standby database using current logfile disconnect;


Verify DG Broker Configuration:

DGMGRL> show configuration

Configuration - ZEE_DG_CONFIG

  Protection Mode: MaxPerformance
  Databases:
    zee   - Primary database
    zeedr - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

---------------------------------------------------------
DGMGRL> show database zeedr

Database - zeedr

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds
  Apply Lag:       0 seconds
  Real Time Query: OFF
  Instance(s):
    zee

Database Status:
SUCCESS


How to avoid this issue:

1. This Problem can only happen if Managed Recovery is started manually which should not be done at 
all if there is an active Data Guard Broker Configuration - reference Doc ID 249703.1 Typically the 
Data Guard Broker should start Managed Recovery.
2. It can also happen if there are no Standby RedoLogs in Place or they are incorrectly configured
- reference Doc ID 219344.1 to set them up.