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

How to delete the archive log of master and standby libraries regularly in DG environment

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

Share

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

This article mainly introduces the DG environment how to delete the main and standby library archive logs regularly, the article is very detailed, has a certain reference value, interested friends must read it!

This policy is implemented in both the DG master and slave databases. In principle, only the master database is required, but it also needs to be modified if the master / slave database is switched to the master database.

RMAN > show all

-- check that the original policy is NONE

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

-- both the master and slave databases are executed. Modify the archive log deletion policy, and only delete logs that have been applied by the slave database.

-- the master database must modify this parameter to prevent unapplied logs from being mistakenly deleted.-- it is best to modify the slave database, which is used when switching between master and slave.

RMAN > configure archivelog deletion policy to applied on all standby

-- prepare for database execution to determine which logs have been applied to the slave.

SELECT name,SEQUENCE#,FIRST_TIME,REGISTRAR,APPLIED,NEXT_TIME,status FROM V$ARCHIVED_LOG

Where applied = 'YES' and REGISTRAR =' RFS' and name is not null ORDER BY SEQUENCE#

-- execution of the main database to check the application of archive logs. NO is not applied.

Select sequence#,applied from v$archived_log order by sequence# desc

You only need to modify and delete the archive log policy first, and then set up rman backups for both primary and secondary libraries, just like ordinary libraries.

Note that the standby library should add the set/export instance name before backing up the script rman statement.

The above is all the contents of the article "how to regularly delete the archive log of the main and standby libraries in the DG environment". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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