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 is the Failove switching method for Data Guard active and standby libraries?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly explains "what is the Failove switching method of Data Guard active and standby library". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the Failove switching method of Data Guard main and standby library".

Failover operation 1. Verify that the repository has the most recent archive log

(main and standby database execution)

SQL > SELECT UNIQUE THREAD# AS THREAD, MAX (SEQUENCE#) OVER (PARTITION BY thread#) AS LAST from V$ARCHIVED_LOG

THREAD LAST

--

1 49

If there is a result, you need to transfer the archive log of the main database to the standby database, and then register it.

SQL > ALTER DATABASE REGISTER PHYSICAL LOGFILE 'filespec1'

two。 Make sure there is no GAP in the repository.

Prepare for database execution

SQL > SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP

THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#

1 80 82

If no result is returned, there is no GAP; if there is a result, there is a GAP. The above results show that the GAP content contains the archive log sequence80,81,82. The above archive logs need to be copied by the master database, transferred to the standby database, and registered in the standby database.

SQl > ALTER DATABASE REGISTER PHYSICAL LOGFILE 'filespec1'

3. The main library forces shutdown

SQL > shutdown abort

4. Prepare the database to stop log application

SQL > alter database recover managed standby database cancel

SQL > alter database recover managed standby database finish

5. Prepare the database to check the switchover_status

SQL > select switchover_status from v$database

SWITCHOVER_STATUS

-

TO PRIMARY

6. Switch the standby library to the main library

SQL > alter database commit to switchover to primary with session shutdown

7. Open the new main library

SQL > alter database open

8. View the status of the new master library

SQL > select open_mode,database_role,switchover_status from v$database

OPEN_MODE DATABASE_ROLE SWITCHOVER_STATUS

READ WRITE PRIMARY FAILED DESTINATION

9. Back up the new master library

Oracle recommends that you perform a full backup of the new main library.

Thank you for your reading, the above is the content of "what is the Failove switching method of Data Guard active and standby library". After the study of this article, I believe you have a deeper understanding of what the Failove switching method of Data Guard active and standby library is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Wechat

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

12
Report