This is the 8th day of my participation in the August More Text Challenge
The default directory for storing Oracle archive logs is the flashback area. The default size is 2 GB. The flashback area can be used for archive log redundancy.
The premise
The Oracle database is in archive mode.
To use the flashback area, set its size and path first
alter system set db_recovery_file_dest_size=10G scope=both;
alter system set db_recovery_file_dest='/archivelog';
Copy the code
Set the archive path and flashback area to keep archive logs at the same time
alter system set log_archive_dest_1='location=/arch';
alter system set log_archive_dest_10='LOCATION=USE_DB_RECOVERY_FILE_DEST';
Copy the code
Set the archive path to keep archive logs, but not the flashback area
alter system set log_archive_dest_1='location=/arch';
alter system set log_archive_dest_10='';
Copy the code
None Example Set the archive path to save archive logs and the flashback area
alter system set log_archive_dest_1='';
alter system set log_archive_dest_10='LOCATION=USE_DB_RECOVERY_FILE_DEST';
Copy the code
Do not setNeither the archive path nor the flashback zone holds archive logs
alter system set log_archive_dest_1='';
alter system set log_archive_dest_10='';
Copy the code
The test result of the testing machine is that after several times of archiving, it is stuck and cannot be archived:
SQL> alter system switch logfile; SQL> / System altered. SQL> / ALTER System SET log_ARCHIve_dest_1 = "SCOPE=BOTH; ALTER SYSTEM SET log_archive_dest_10='' SCOPE=BOTH; Fri Nov 09 07:45:54 2018 Thread 1 advanced to log sequence 20 (LGWR switch) Current log# 4 seq# 20 mem# 0: /u01/app/oracle/oradata/syd/redo04.log Fri Nov 09 07:45:54 2018 ARCH: Archival stopped, error occurred. Will continue retrying ORACLE Instance syd - Archival Error ORA-16014: log 3 sequence# 19 not archived, no available destinations ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/syd/redo03.log' Thread 1 advanced to log sequence 21 (LGWR switch) Current log# 1 seq# 21 mem# Zero: /u01/app/oracle/oradata/syd/redo01.log Fri Nov 09 07:46:02 2018 Archiver process freed from errors. No longer stopped Fri Nov 09 07:46:34 2018 Thread 1 cannot allocate new log, sequence 22 Checkpoint not complete Current log# 1 seq# 21 mem# 0: /u01/app/oracle/oradata/syd/redo01.log Thread 1 advanced to log sequence 22 (LGWR switch) Current log# 2 seq# 22 mem# 0: /u01/app/oracle/oradata/syd/redo02.log Fri Nov 09 07:46:44 2018 ORACLE Instance syd - Cannot allocate log, archival required Thread 1 cannot allocate new log, sequence 23 All online logs need archiving Examine archive trace files for archiving errors Current log# 2 seq# 22 mem# 0: /u01/app/oracle/oradata/syd/redo02.log Fri Nov 09 07:51:11 2018 ARCH: Archival stopped, error occurred. Will continue retrying ORACLE Instance syd - Archival Error ORA-16014: log 3 sequence# 19 not archived, no available destinations ORA-00312: online log 3 thread 1: '/ u01 / app/oracle/oradata Syd/redo03 log' return to normal after restart the instance, this file was changed back to keep in flashback area: SQL> shu immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 1068937216 bytes Fixed Size 2260088 bytes Variable Size 884999048 bytes Database Buffers 176160768 bytes Redo Buffers 5517312 bytes Database mounted. Database opened. SQL> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 19 Next log sequence to archive 22 Current log sequence 22 SQL> alter system switch logfile; System altered. SQL> / System altered. SQL> / System altered. SQL> / System altered.Copy the code