Query archive History:
SELECT FIRST_TIME,FIRST_CHANGE#,NEXT_CHANGE#, SEQUENCE# FROM V$LOG_HISTORY;
Check the path to the archive and create information
SELECT NAME,CREATOR,SEQUENCE#,APPLIED,COMPLETION_TIME FROM V$ARCHIVED_LOG;
View the process of active
V $ MANAGED_STANDBY view of the display is dedicated to the physical Standby database related processes of
the current state, this view is also very characteristic column, view the process status, usually we will focus
PROCESS, CLIENT_PROCESS, SEQUENC # and STATUS columns ,E.g:
SQL> SELECT PROCESS,CLIENT_PROCESS,SEQUENCE#, STATUS FROM V$MANAGED_STANDBY; PROCESS CLIENT_P SEQUENCE# STATUS --------- -------- ---------- ------------ ARCH ARCH 78 CLOSING ARCH ARCH 79 CLOSING MRP0 N/A 80 WAIT_FOR_LOG RFS LGWR 80 IDLE RFS ARCH 0 IDLE RFS N/A 0 IDLE
Instructions:
the PROCESS: Process name, such as ARCH, RFS, MRP0 and so on.
CLIENT_P: corresponding Primary database processes such as ARCH, LGWR and so on.
SEQUENCE #: archive number.
STATUS: Current state of the process, the value of more common are:
1) ALLOCATED: Primary is preparing a database connection.
2) ATTACHED: Connecting Primary database.
3) CONNECTED: connected to the Primary database.
4) IDLE: idle.
5) RECEIVING: archive reception.
6) OPENING: archive processing.
7) CLOSING: archive processed, ending in.
8) WRITING: REDO database write to the archive.
9) WAIT_FOR_LOG: REDO wait for new data.
10) WAIT_FOR_GAP: filing an interrupt is awaiting that part of the REDO data interruption.
11) APPLYING_LOG: REDO application data.
View the final application archives
the SELECT THREAD #, MAX (the SEQUENCE #) AS "LAST_APPLIED_LOG" the FROM V $ LOG_HISTORY the GROUP BY THREAD #;
THREAD # LAST_APPLIED_LOG
---------- ---------- ------
1 3104
See the corresponding application state of
the SELECT the THREAD #, the SEQUENCE #, the APPLIED the FROM V $ ARCHIVED_LOG;
the THREAD the SEQUENCE # # the APPLIED
---------- ---------- ------- -
. 1 3098 YES
. 1 3099 YES
. 1 3100 YES
. 1 3101 YES
. 1 3102 YES
. 1 3103 YES
. 1 the iN-3104 the MEMORY
log file to view the physical Standby database unreceived
transmission log file is controlled by LOG_ARHIVE_DEST_N parameters, we need only
to comparison between the locally generated and archived to the distal end of the generated archive difference. For example:
SELECT local.thread #, # local.sequence from (SELECT Thread #, # Sequence from V $ = ARCHIVED_LOG WHERE DEST_ID. 1) Not in local # local.sequence WHERE (SELECT Sequence from V $ # = 2 and ARCHIVED_LOG WHERE DEST_ID # = # local.thread Thread);
the THREAD the SEQUENCE # #
---------- ----------
1 3098
1 3099
1 3100
1 3101
1 3102
1 3103
1 3104
monitoring log application service
queries the current basic information data (v $ database information)
database_role the SELECT, the DB_UNIQUE_NAME, open_mode, Protection mode, protection_level, SWITCHOVER_STATUS from v $ Database;
database_role the DB_UNIQUE_NAME open_mode
---------------- -------------- -------------------- ----------------
Protection mode protection_level SWITCHOVER_STATUS
----------- --------- -------------------- --------------------
PHYSICAL standby_oracle01 MOUNTED STANDBY
to MAXIMUM the PERFORMANCE the NOT ALLOWED to MAXIMUM the PERFORMANCE
View the current active application and REDO REDO transport services
query the status of the current REDO REDO application and transmission services non-physical Standby database
V $ MANAGED_STANDBY none other than the view, for example:
select process, status, thread#, sequence#, block#, blocks from v$managed_standby; PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS --------- ------------ ---------- ---------- ---------- ---------- ARCH CONNECTED 0 0 0 0 ARCH CONNECTED 0 0 0 0 ARCH CONNECTED 0 0 0 0 ARCH CLOSING 1 3104 6144 1008 ARCH CONNECTED 0 0 0 0 RFS IDLE 0 0 0 0 RFS IDLE 0 0 0 0 RFS IDLE 1 3105 1596 1 MRP0 APPLYING_LOG 1 3105 1596 163840
Check the application mode (if enabled real-time applications)
physical Standby database query V $ ARCHIVE_DEST_STATUS view, if you open a real
application, then RECOVERY_MODE column will appear as: the MANAGED REAL the TIME APPLY,
RECOVERY_MODE
----------- ------------
IDLE
the Data Guard event (V $ DATAGUARD_STATUS)
SQL> SELECT MESSAGE FROM V$DATAGUARD_STATUS; MESSAGE -------------------------------------------------------------------------------- ARC0: Archival started ARC1: Archival started ARC2: Archival started ARC3: Archival started ARC3: Becoming the 'no FAL' ARCH ARC2: Becoming the heartbeat ARCH ARC2: Becoming the active heartbeat ARCH ARC4: Archival started Managed Standby Recovery not using Real Time Apply RFS[1]: Assigned to RFS process 27418 ARC3: Beginning to archive thread 1 sequence 3102 (14245665-14245874) MESSAGE -------------------------------------------------------------------------------- ARC3: Completed archiving thread 1 sequence 3102 (0-0) Primary database is in MAXIMUM PERFORMANCE mode RFS[2]: Assigned to RFS process 27420 Attempt to start background Managed Standby Recovery process MRP0: Background Managed Standby Recovery process started Managed Standby Recovery starting Real Time Apply Clearing online redo logfile 1 /u01/app/oracle/oradata/oracle01/redo01.log Clearing online redo logfile 1 complete Clearing online redo logfile 2 /u01/app/oracle/oradata/oracle01/redo02.log Clearing online redo logfile 2 complete Clearing online redo logfile 3 /u01/app/oracle/oradata/oracle01/redo03.log MESSAGE -------------------------------------------------------------------------------- Clearing online redo logfile 3 complete Clearing online redo logfile 9 /u01/app/oracle/oradata/oracle01/redo05a.log Clearing online redo logfile 9 complete Media Recovery Log /u01/app/oracle/product/11.2.0/db_1/dbs/archivelog/1_3102_100 0748999.dbf Media Recovery Waiting for thread 1 sequence 3103 (in transit) ARC3: Beginning to archive thread 1 sequence 3103 (14245874-14245930) ARC3: Completed archiving thread 1 sequence 3103 (0-0) Media Recovery Waiting for thread 1 sequence 3104 (in transit) MRP0: Background Media Recovery cancelled with status 16037 MESSAGE -------------------------------------------------------------------------------- Managed Standby Recovery not using Real Time Apply MRP0: Background Media Recovery process shutdown Managed Standby Recovery Canceled Attempt to start background Managed Standby Recovery process MRP0: Background Managed Standby Recovery process started Managed Standby Recovery starting Real Time Apply Media Recovery Waiting for thread 1 sequence 3104 (in transit) ARC3: Beginning to archive thread 1 sequence 3104 (14245930-14250924) ARC3: Completed archiving thread 1 sequence 3104 (0-0) Media Recovery Waiting for thread 1 sequence 3105 (in transit) 41 rows selected.
Set RECOVER degree of parallelism
during media recovery or REDO application, you need to read the redo log file, the default is the serial
complex, we can add PARALLEL clause to specify the degree of parallelism in the implementation of RECOVER,
high read and applications properties such as:
SQL> RECOVER STANDBY DATABASE PARALLEL 2 ;
View protected mode
SQL> select protection_mode,protection_level from v$database; PROTECTION_MODE PROTECTION_LEVEL -------------------- -------------------- MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE