アーカイブログファイルの出力先 確認
事前に、以下のコマンドで現在のアーカイブログファイルの出力先を確認してみた
SQL> set lin window
SQL> col DEST_NAME for a30
SQL> col DESTINATION for a40
SQL> select dest_id,dest_name,destination from v$archive_dest where dest_id=1 or dest_id=2;
DEST_ID DEST_NAME DESTINATION
---------- ------------------------------ ----------------------------------------
1 LOG_ARCHIVE_DEST_1 /home/archive/
2 LOG_ARCHIVE_DEST_2
実際にアーカイブログファイルを出力してみた(事前確認)
ログスイッチを起こして、アーカイブログの出力を実際に確認してみた。
[oracle@CentOS_clone archive]$ pwd
/home/archive
[oracle@CentOS_clone archive]$ ls -ltr
total 11692
-rw-r----- 1 oracle oinstall 1024 Feb 3 02:43 1_8_1144699765.dbf
-rw-r----- 1 oracle oinstall 6268416 Feb 3 03:05 1_9_1144699765.dbf
-rw-r----- 1 oracle oinstall 5692928 Feb 3 13:06 1_11_1144699765.dbf
-rw-r----- 1 oracle oinstall 3072 Feb 3 13:08 1_12_1144699765.dbf
[oracle@CentOS_clone archive]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on 土 2月 3 13:10:01 2024
Version 19.19.0.0.0
Copyright (c) 1982, 2022, Oracle. All rights reserved.
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.19.0.0.0
に接続されました。
SQL> alter system switch logfile;
システムが変更されました。
SQL> Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.19.0.0.0との接続が切断されました。
[oracle@CentOS_clone archive]$ ls -l
total 11700
-rw-r----- 1 oracle oinstall 5692928 Feb 3 13:06 1_11_1144699765.dbf
-rw-r----- 1 oracle oinstall 3072 Feb 3 13:08 1_12_1144699765.dbf
-rw-r----- 1 oracle oinstall 5632 Feb 3 13:10 1_13_1144699765.dbf
-rw-r----- 1 oracle oinstall 1024 Feb 3 02:43 1_8_1144699765.dbf
-rw-r----- 1 oracle oinstall 6268416 Feb 3 03:05 1_9_1144699765.dbf
[oracle@CentOS_clone archive]$ ls -ltr
total 11700
-rw-r----- 1 oracle oinstall 1024 Feb 3 02:43 1_8_1144699765.dbf
-rw-r----- 1 oracle oinstall 6268416 Feb 3 03:05 1_9_1144699765.dbf
-rw-r----- 1 oracle oinstall 5692928 Feb 3 13:06 1_11_1144699765.dbf
-rw-r----- 1 oracle oinstall 3072 Feb 3 13:08 1_12_1144699765.dbf
-rw-r----- 1 oracle oinstall 5632 Feb 3 13:10 1_13_1144699765.dbf
【本題】アーカイブログファイルを高速リカバリ領域に格納する!
以下のコマンドで、アーカイブログファイルを高速リカバリ領域に格納してみた
SQL> alter system set log_archive_dest_1='location=USE_DB_RECOVERY_FILE_DEST' scope=both;
システムが変更されました。
SQL>
SQL>
SQL> set lin window
col DEST_NAME for a30
col DESTINATION for a40
select dest_id,dest_name,destination from v$archive_dest where dest_id=1 or dest_id=2;SQL> SQL> SQL>
DEST_ID DEST_NAME DESTINATION
---------- ------------------------------ ----------------------------------------
1 LOG_ARCHIVE_DEST_1 USE_DB_RECOVERY_FILE_DEST
2 LOG_ARCHIVE_DEST_2
SQL>
実際にアーカイブログファイルファイルを出力してみた(事後確認)
SQL>
SQL> alter system switch logfile;
システムが変更されました。
SQL> Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.19.0.0.0との接続が切断されました。
[oracle@CentOS_clone archive]$ ls -ltr
total 11700
-rw-r----- 1 oracle oinstall 1024 Feb 3 02:43 1_8_1144699765.dbf
-rw-r----- 1 oracle oinstall 6268416 Feb 3 03:05 1_9_1144699765.dbf
-rw-r----- 1 oracle oinstall 5692928 Feb 3 13:06 1_11_1144699765.dbf
-rw-r----- 1 oracle oinstall 3072 Feb 3 13:08 1_12_1144699765.dbf
-rw-r----- 1 oracle oinstall 5632 Feb 3 13:10 1_13_1144699765.dbf
↑事前に確認したディレクトリには、アーカイブログが格納されていないことがわかる
↓高速リカバリ領域を確認してみる
[oracle@CentOS_clone archive]$ ls -ltr /home/oracle/flash/ORA19C/archivelog/2024_02_03/
total 32
-rw-r----- 1 oracle oinstall 32256 Feb 3 13:15 o1_mf_1_14_lvvhhv8s_.arc
以上です。