Get the App
SLTechnology News&Howtos  ›  Database  › 

How to check whether DG is a real-time application in the database

Shulou Source: shulou.com Published: 2022-05-31 15:19:32 10月04日 Update

This article is about how to check whether DG is a real-time application in the database. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.

When doing DG of a certain business system, it is found that DG extraction is wrong, check DG status and find that it switches twice a day. Read only, application

Select database_role,switchover_status from v$database;

select protection_mode,protection_level from v$database;

Select process, status, thread#,sequence#, block#, blocks from v$managed_standby;

Select recovery_mode from v$archive_dest_status;

View archive logs lost during backup apply redo select * from v$archive_gap;

See also v$archive_dest_status:

Reserve:

SQL > select DEST_NAME , STATUS , RECOVERY_MODE from v$archive_dest_status

DEST_NAME STATUS RECOVERY_MODE

------------------------------ --------- -----------------------

LOG_ARCHIVE_DEST_1 VALID MANAGED REAL TIME APPLY

LOG_ARCHIVE_DEST_2 VALID IDLE

Master Library:

15:30:25 SQL> select DEST_NAME , STATUS , RECOVERY_MODE from v$archive_dest_status;

DEST_NAME STATUS RECOVERY_MODE

---------------------------------------- --------- -----------------------

LOG_ARCHIVE_DEST_1 VALID IDLE

LOG_ARCHIVE_DEST_2 VALID MANAGED REAL TIME APPLY

Summary: Whether it is the main library or the backup library:

recover_mode is MANAGED REAL TIME APPLY is real-time application; is MANAGED is non-real-time application.

See also: v$managed_standby

Reserve:

15:24:23 SQL> select process ,status , sequence# from v$managed_standby;

PROCESS STATUS SEQUENCE#

--------- ------------ ----------

ARCH CONNECTED 0

ARCH CONNECTED 0

ARCH CONNECTED 0

ARCH CLOSING 18

RFS IDLE 0

RFS IDLE 19

MRP0 APPLYING_LOG 19

Master Library:

15:30:53 SQL> select process, status, sequence# from v$managed_standby;

PROCESS STATUS SEQUENCE#

--------- ------------ ----------

ARCH CLOSING 15

ARCH CLOSING 15

ARCH CLOSING 16

ARCH CLOSING 18

LNS WRITING 19

SQL> select process, status, sequence# from v$managed_standby;

PROCESS STATUS SEQUENCE#

--------- ------------ ----------

ARCH CLOSING 1530

ARCH CLOSING 1531

LGWR WRITING 1532

Summary: From v$managed_standby,

MRP process STATUS is APPLYING_LOG is real-time application, or LNS process is WRITING is real-time reference;

Standby MRP process STATUS is WAIT_FOR_LOG non-real-time application, or main library LGWR or archiving process is WRITING non-real-time reference;(real-time application uses LNS process to send logs, non-real-time application uses LGWR or ARCH process to send logs)

Thank you for reading! About "how to check whether DG is a real-time application in the database" this article is shared here, I hope the above content can be of some help to everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!

Tags: Real-time applications processes logs right and wrong data databases content more status articles related good practical business articles times patterns see knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Apple MySQL vpn Microsoft