Saving Archive logs in different destinations and changing log_archive_format


[pcsh lang=”bash” tab_size=”4″ message=”” hl_lines=”” provider=”manual”]

SYS@valeh> alter system set log_archive_dest_2 = 'LOCATION=/u01/';
SYS@valeh> alter system set log_archive_dest_2 = 'LOCATION=/tmp/';
SYS@valeh> SHOW PARAMETER LOG_ARCHIVE_FORMAT;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_format                   string      %t_%s_%r.dbf

LOG_ARCHIVE_FORMAT-a ashaqidaki parametrleri elave edirik

alter system set LOG_ARCHIVE_FORMAT='log%a_%d_%T_%S_%t_%s_%r.arc' scope=spfile;

SYS@valeh> startup force;

SYS@valeh> SHOW PARAMETER LOG_ARCHIVE_FORMAT;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_format                   string      log%a_%d_%T_%S_%t_%s_%r.arc

SYS@valeh> alter system checkpoint;
SYS@valeh> alter system checkpoint;

SYS@valeh> SELECT NAME FROM V$ARCHIVED_LOG;
/u01/log97b822e4_97b801e4_0001_0000000038_1_38_751844965.arc
/tmp/log97b822e4_97b801e4_0001_0000000038_1_38_751844965.arc

[/pcsh]

[pcsh lang=”bash” tab_size=”4″ message=”” hl_lines=”” provider=”manual”]

SYS@valeh> alter system set log_archive_dest_2 = 'LOCATION=/u01/';
SYS@valeh> alter system set log_archive_dest_2 = 'LOCATION=/tmp/';
SYS@valeh> SHOW PARAMETER LOG_ARCHIVE_FORMAT;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_format                   string      %t_%s_%r.dbf

LOG_ARCHIVE_FORMAT-a ashaqidaki parametrleri elave edirik

alter system set LOG_ARCHIVE_FORMAT='log%a_%d_%T_%S_%t_%s_%r.arc' scope=spfile;

SYS@valeh> startup force;

SYS@valeh> SHOW PARAMETER LOG_ARCHIVE_FORMAT;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_format                   string      log%a_%d_%T_%S_%t_%s_%r.arc

SYS@valeh> alter system checkpoint;
SYS@valeh> alter system checkpoint;

SYS@valeh> SELECT NAME FROM V$ARCHIVED_LOG;
/u01/log97b822e4_97b801e4_0001_0000000038_1_38_751844965.arc
/tmp/log97b822e4_97b801e4_0001_0000000038_1_38_751844965.arc

[/pcsh]