Using RMAN, you can manage archived log files regarding when they are eligible for deletion. Archived log files can be deleted manually using DELETE ... ARCHIVELOG command anytime. However, using CONFIGURE ARCHIVE DELETION POLICY command let us specify automatic archivelog deletion.
/* on RMAN, to make archived log files becomes eligible for deletion when they have been applied to the required standby databases */
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
/* on RMAN, to make archived log files becomes eligible for deletion when archived log files have been transferred to remote destination */
CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED ON STANDBY;
Q1. Configure archivelog deletion policy and make sure they are eligible for the deletion when they applied to the standby database. Stop the apply process on the standby database, switch log files on the primary database and make sure they are not applied to the standby database. Try to delete all archived log files on the primary database and make sure they are not deleted (because they are not applied). (10min)
1. Switch archivelog deletion policy

/* RMAN */
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
2. switch a few redo log files check archived log sequence number that applied or archived.

ALTER SYSTEM SWITCH LOGFILE;
SELECT max(sequence#) FROM v$archived_log WHERE applied='YES';
SELECT max(sequence#) FROM v$archived_log WHERE archived='YES';
3. On RMAN, let's try to delete arcvhielog all. If max sequence value of applied was bigger than value of archvied, that files are not deleted.

DELETE ARCHIVELOG ALL;
'Oracle > OCM Journey' 카테고리의 다른 글
9-6 Data Guard - Convert the standby to a snapshot standby (0) | 2023.08.30 |
---|---|
9-5 Data Guard - Configure connect time failover (0) | 2023.08.30 |
9-4 Data Guard - Switchover and switch back (0) | 2023.08.29 |
9-3 Data Guard - Configure the Observer (0) | 2023.08.29 |
9-2 Data Guard - Configure the data guard environment to reduce overheads of fast incremental backups on the primary database (0) | 2023.08.27 |