Monday, September 02, 2013

differences of log_archive_dest and log_archive_dest_n

SYS@DG> alter system set log_archive_dest = '/home/oracle/temp';
alter system set log_archive_dest = '/home/oracle/temp'
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16018: cannot use LOG_ARCHIVE_DEST with LOG_ARCHIVE_DEST_n or DB_RECOVERY_FILE_DEST


orarac1poc:DG:/u01/app/oracle/product/11.2.0/db_2/dbs> grep -i log_archive initDG.ora
*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(DG,DGS)'
*.LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=DG'
*.LOG_ARCHIVE_DEST_2='SERVICE=DGS ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=DGS'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='DG_%t_%s_%r.arc'


SYS@DG> alter system set LOG_ARCHIVE_DEST_3='LOCATION=/home/oracle/temp/' ;

System altered.

SYS@DG> !ls -l /home/oracle/temp/
total 0

SYS@DG> alter system switch logfile;

System altered.

SYS@DG> !ls -l /home/oracle/temp/
total 26948
-rw-r----- 1 oracle asmadmin 27561984 Sep  2 09:57 DG_1_2731_805314423.arc

SYS@DG> !ls -l /u01/oradata/DG/FRA/DG/archivelog/2013_09_02/
total 107168
-rw-r----- 1 oracle asmadmin 41866752 Sep  2 00:02 o1_mf_1_2729_926s97rm_.arc
-rw-r----- 1 oracle asmadmin 40182784 Sep  2 04:00 o1_mf_1_2730_92777d27_.arc
-rw-r----- 1 oracle asmadmin 27561984 Sep  2 09:57 o1_mf_1_2731_927w3lm5_.arc


LOG_ARCHIVE_DEST is applicable only if you are running the database in ARCHIVELOG mode or are recovering a database from archived redo logs. LOG_ARCHIVE_DEST is incompatible with the LOG_ARCHIVE_DEST_n parameters, and must be defined as the null string ("") or (' ') when any LOG_ARCHIVE_DEST_n parameter has a value other than a null string.

LOG_ARCHIVE_FORMAT is applicable only if you are using the redo log in ARCHIVELOG mode. Use a text string and variables to specify the default filename format when archiving redo log files. The string generated from this format is appended to the string specified in the LOG_ARCHIVE_DEST parameter.