oracle_guard_installation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
oracle_guard_installation [2020/10/25 09:16] andonovjoracle_guard_installation [2020/10/25 15:17] (current) – [Verify Replication] andonovj
Line 616: Line 616:
 Database is administrator managed Database is administrator managed
 [oracle@wnode03 ~]$ [oracle@wnode03 ~]$
 +</Code>
 +
 +====Verify Replication====
 +To verify replication, we can simply check 2 things. Is the MRP process on the Standby Running, is the archivelogs being applied. Don't forget that the Data Guard in general can be either:
 +
 +  * Physical Guard (up to Read Only - Active Data Guard)
 +  * Logical Guard (up to Read Write)
 +
 +{{:oracledataguard.jpg?600|}}
 +
 +
 +----
 +Archiver Process –  The archiver process (ARCn or ARCH) is responsible for archiving online redo logs. The archival destination could be a local destination or a remote standby database site. In the case of a Data Guard configuration, one of the archival destinations must be a standby database.  The archiver process of the primary database writes the redo log file.
 +
 +Log Writer (LGWR) – The log writer process on the primary database writes entries from the redo log buffer to the online redo log file. When the current online redo log file is full, it triggers the archiver process to start the archiving activity.
 +
 +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 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.
 +
 +Because of that there are limitation of the Logical Guard. But we will address that in the Logical Guard section, enough side ways :)
 +----
 +
 +So, to verify the application we can do the following:
 +
 +<Code:bash|Verify Apply>
 +--On Standby
 +[oracle@wnode03 ~]$ pgrep -lf mrp
 +25968 ora_mrp0_westdb1
 +[oracle@wnode03 dbs]$
 +[oracle@wnode03 ~]$ sqlplus / as sysdba
 +SQL> SELECT THREAD#, SEQUENCE#, APPLIED FROM V$ARCHIVED_LOG ORDER BY
 +THREAD#;
 +THREAD# SEQUENCE# APPLIED
 +---------- ---------- ---------
 +1 12 YES
 +1 13 YES
 +1 11 YES
 +2 4 IN-MEMORY
 +2 3 YES
 +2 2 YES
 +6 rows selected.
 +SQL>
 +
 +--on Primary:
 +SQL> alter system archive log current;
 +System altered.
 +SQL> SELECT THREAD#, MAX(SEQUENCE#) FROM GV$ARCHIVED_LOG WHERE
 +RESETLOGS_CHANGE# = (SELECT MAX(RESETLOGS_CHANGE#) FROM
 +GV$ARCHIVED_LOG) GROUP BY THREAD#;
 +THREAD# MAX(SEQUENCE#)
 +---------- --------------
 +1 16
 +2 7
 +SQL>
 +
 +--On Standby
 +SQL> SELECT THREAD#, SEQUENCE#, APPLIED FROM V$ARCHIVED_LOG ORDER BY
 +THREAD#;
 +THREAD# SEQUENCE# APPLIED
 +---------- ---------- ---------
 +1 16 YES
 +1 15 YES
 +1 13 YES
 +1 11 YES
 +1 14 YES
 +1 12 YES
 +2 6 YES
 +2 5 YES
 +2 7 IN-MEMORY
 +2 3 YES
 +2 2 YES
 +THREAD# SEQUENCE# APPLIED
 +---------- ---------- ---------
 +2 4 YES
 +12 rows selected.
 +SQL>
 +
 +SQL> select inst_id, process, status, sequence#, thread# from
 +gv$managed_standby;
 +INST_ID PROCESS STATUS SEQUENCE# THREAD#
 +---------- --------- ------------ ---------- ----------
 +1 ARCH CLOSING 13 1
 +1 ARCH CONNECTED 0 0
 +1 ARCH CLOSING 7 2
 +1 ARCH CLOSING 5 2
 +1 RFS IDLE 8 2
 +1 RFS IDLE 0 0
 +1 RFS IDLE 0 0
 +1 MRP0 APPLYING_LOG 8 2
 +2 ARCH CLOSING 16 1
 +2 ARCH CONNECTED 0 0
 +2 ARCH CLOSING 14 1
 +INST_ID PROCESS STATUS SEQUENCE# THREAD#
 +---------- --------- ------------ ---------- ----------
 +2 ARCH CLOSING 15 1
 +2 RFS IDLE 0 0
 +2 RFS IDLE 0 0
 +2 RFS IDLE 17 1
 +15 rows selected.
 </Code> </Code>
  
  
  • oracle_guard_installation.1603617381.txt.gz
  • Last modified: 2020/10/25 09:16
  • by andonovj