How to delete the archive log of master and standby libraries regularly in DG environment
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!