Multi-channel archiving of Oracle databases to prevent single point of failure
I. It is usually used to solve the following problems:
Database hang problems caused by full archiving Directories
Archive multiple paths to prevent spof
2. the implementation of multi-path archiving is controlled by the following two parameters:
LOG_ARCHIVE_DEST_n --- use the LOG_ARCHIVE_DEST_n parameter to define multiple archive paths
Log_archive_min_succeed_dest
Iii. parameter description:
The LOG_ARCHIVE_DEST_n parameter defines multiple archive paths. When you use the initialization parameter LOG_ARCHIVE_DEST_n to configure the archive location, you can specify the OPTIONAL or MANDATORY option on the archive location. When specifying the MANDATORY option, you can set.
OPTIONAL: This option is the default option. When this option is used, the redo log can be overwritten regardless of whether the archiving is successful or not.
MANDATORY: Forced archiving. When this option is used, the redo log can be overwritten only after the archive is successful.
REOPEN: This attribute is used to specify the time interval for archiving again. The default value is 300 seconds. It must be after MANDATORY.
The LOG_ARCHIVE_MIN_SUCCEED_DEST parameter controls the minimum number of successful local archives.
Iv. Experiment steps:
If you want to solve the problem of full archiving space or full archiving of a path, you can set two archiving paths: optional and log_archive_min_succeed_dest to 1. The disadvantage is that two archived logs must be archived under normal conditions in both directories. The lab procedure is as follows:
1. Modify to the multi-path mode. Each path is optional, but at least one is successful before the log can be overwritten:
SQL> alter systemset log_archive_dest_1 = 'location =/Oracle/archive/arch1 optional ';
System altered.
SQL> alter systemset log_archive_dest_2 = 'location =/oracle/archive/arch2 optional ';
System altered.
SQL> showparameter log_archive_min_succeed_dest
NAME TYPE VALUE
-----------------------------------------------------------------------------
Log_archive_min_succeed_dest integer 1
2. the archive operation can be successful after multiple tests:
SQL> alter systemswitch logfile;
System altered.
[Root @ dtydb0 arch1] # ls-l/oracle/archive/arch *
/Oracle/archive/arch1:
Total 389564
-Rw-r ----- 1 oracle oinstall 397999616 May 14 1_211_740745127.dbf
-Rw-r ----- 1 oracle oinstall 507904 May 14 1_212_740745127.dbf
/Oracle/archive/arch2:
Total 389564
-Rw-r ----- 1 oracle oinstall 397999616 May 14 1_211_740745127.dbf
-Rw-r ----- 1 oracle oinstall 507904 May 14 1_212_740745127.dbf
3. Modify the arch1 permission. archive is not allowed. Archive continues. archive is only allowed to archive to arch2. When the database archive is normal.
[Root @ bkjia] # chown-R root: root./arch1
[Root @ bkjia] # ls-lrt
SQL> alter systemswitch logfile;
System altered.
[Root @ bkjia] # ls-l/oracle/archive/arch *
/Oracle/archive/arch1:
Total 389564
-Rw-r ----- 1 root 397999616 May 14 17:05 1_211_740745127.dbf
-Rw-r ----- 1 root 507904 May 14 17:06 1_212_740745127.dbf
/Oracle/archive/arch2:
Total 390272
-Rw-r ----- 1 oracle oinstall 397999616 May 14 1_211_740745127.dbf
-Rw-r ----- 1 oracle oinstall 507904 May 14 1_212_740745127.dbf
-Rw-r ----- 1 oracle oinstall 351744 May 14 1_213_740745127.dbf
-Rw-r ----- 1 oracle oinstall 332800 May 14 1_214_740745127.dbf
-Rw-r ----- 1 oracle oinstall 2560 May 14 1_215_740745127.dbf
-Rw-r ----- 1 oracle oinstall 6656 May 14 1_216_740745127.dbf
4. Modify the permission and archive the two paths again.
[Root @ bkjia] # chown-R oracle: oinstall/oracle/archive/arch1
[Root @ bkjia] # ls-l/oracle/archive/arch *
/Oracle/archive/arch1:
Total 389788
-Rwxr-xr-x 1 oracle oinstall 397999616 May 14 17:05 1_211_740745127.dbf
-Rwxr-xr-x 1 oracle oinstall 507904 May 14 17:06 1_212_740745127.dbf
-Rw-r ----- 1 oracle oinstall 220672 May 14 1_219_740745127.dbf
/Oracle/archive/arch2:
Total 391464
-Rw-r ----- 1 oracle oinstall 397999616 May 14 1_211_740745127.dbf
-Rw-r ----- 1 oracle oinstall 507904 May 14 1_212_740745127.dbf
-Rw-r ----- 1 oracle oinstall 351744 May 14 1_213_740745127.dbf
-Rw-r ----- 1 oracle oinstall 332800 May 14 1_214_740745127.dbf
-Rw-r ----- 1 oracle oinstall 2560 May 14 1_215_740745127.dbf
-Rw-r ----- 1 oracle oinstall 6656 May 14 1_216_740745127.dbf
-Rw-r ----- 1 oracle oinstall 628736 May 14 1_217_740745127.dbf
-Rw-r ----- 1 oracle oinstall 342528 May 14 1_218_740745127.dbf
-Rw-r ----- 1 oracle oinstall 220672 May 14 1_219_740745127.dbf