Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the orders for DataGuard health check?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "what are the orders for DataGuard health examination". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

First, the main library check command 1. Protection Mode check of dg Environment in main Library

SQL > select db_unique_name,database_role, protection_mode,switchover_status from v$database

DB_UNIQUE_NAME DATABASE_ROLE PROTECTION_MODE SWITCHOVER_STATUS

--

ORCL PRIMARY MAXIMUM PERFORMANCE TO STANDBY

The above results show that the main library db_unique_name is the ORCL; role as the main library, the protection mode is the maximum performance, and the status is switched to enable the preparation of the library.

two。 Check whether the set archive log path is available on the main library

SQL > select dest_name,status,error from v$archive_dest

This view user checks whether the local and remote archive log paths are available, and if the remote archive log path is not available, there will be corresponding errors in the ERROR column.

3. View the status information of DG on the main library

SQL > set linesize 300

SQL > set pagesize 1000

SQL > col message for A100

SQL > select to_char (timestamp,'DD-mm-YYYY HH24:MI:SS') time,message FROM v$dataguard_status

4. View the status of DG environment processes on the main library

SQL > SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY

ARCH process: used to copy redo log on the main library to generate archive logs. The current status of CLOSING indicates that the process is currently replicating redo log. We set the maximum number of processes in the parameter file to 4.

LNS process: lns reads the same redo record from the primary database log buffer, passes it to the standby database through the oracle net service, and the rfs on the standby database receives the redo data and writes it to the standby redo log file

Second, prepare the library inspection command 1. View the status of processes specific to the DG environment on the slave library

SQL > SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY

RFS process: used to prepare the library to receive archive logs delivered from the main library LNS process or ARCH process

ARCH: used to replicate archive logs synchronized from the main library

MRP0: used to apply archive log

two。 View the status information of the DG environment on the repository

SQL > set linesize 300

SQL > set pagesize 1000

SQL > col message for A100

SQL > select message_num,message from v$dataguard_status

3. The standby side checks whether the log is applied.

SQL > select name,SEQUENCE#,APPLIED from v$archived_log order by sequence#

If you find that the numbers of the archive logs of the slave database are not continuous, you need to go to the master database to compare the archive log numbers of the master database to find those archive logs that have been archived on the master database but not synchronized to the slave database to copy them manually, and register them with the slave database. The command to register the archive logs is as follows:

SQL > alter database register physical logfile'/ arch/ archive file name'

Then restart the application archive log process for preparing the database.

4. Check the archive log on the repository to see if there are any broken files.

SQL > select * from v$archive_gap

If the DG environment log synchronization is normal, no records will be found. If the result is found, it indicates that the current DG environment archive log delivery is broken.

This is the end of the content of "what are the orders for DataGuard health examination". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report