Oracle 10G Archive Destination 理解

ysjxjf發表於2008-04-16
奇怪,blog 中為什麼會丟失 反斜線?
以下路徑中丟失了 反斜線
預設情況:
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 9
Next log sequence to archive 12
Current log sequence 12
看一下,我的 recovery 的位置和 大小。
SQL> show parameter recovery
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string D:oracleproduct10.2.0/flash
_recovery_area
db_recovery_file_dest_size big integer 2G
recovery_parallelism integer 0
SQL>
SQL> show parameter arch
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
archive_lag_target integer 0
log_archive_config string
log_archive_dest string
log_archive_dest_1 stringlog_archive_dest_10 string
log_archive_dest_2 string
log_archive_dest_3 string
log_archive_dest_4 string
log_archive_dest_5 string
log_archive_dest_6 string
log_archive_dest_7 string
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_8 string
log_archive_dest_9 string
log_archive_dest_state_1 string enable
log_archive_dest_state_10 string enable
log_archive_dest_state_2 string enable
log_archive_dest_state_3 string enable
log_archive_dest_state_4 string enable
log_archive_dest_state_5 string enable
log_archive_dest_state_6 string enable
log_archive_dest_state_7 string enable
log_archive_dest_state_8 string enable
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_9 string enable
log_archive_duplex_dest string
log_archive_format string ARC%S_%R.%T
log_archive_local_first boolean TRUE
log_archive_max_processes integer 5
log_archive_min_succeed_dest integer 1
log_archive_start boolean FALSE
log_archive_trace integer 0
remote_archive_enable string true
standby_archive_dest string %ORACLE_HOME%RDBMS
注意以下語句中的 Location ,很容易忘掉。
SQL> alter system set log_archive_dest_1='location=C:archived_log' scope=both;
System altered.
SQL> show parameter arch
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
archive_lag_target integer 0
log_archive_config string
log_archive_dest string
log_archive_dest_1 string location=C:archived_log
log_archive_dest_10 string
log_archive_dest_2 string
log_archive_dest_3 string
log_archive_dest_4 string
log_archive_dest_5 string
log_archive_dest_6 string
log_archive_dest_7 string
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_8 string
log_archive_dest_9 string
log_archive_dest_state_1 string enable
log_archive_dest_state_10 string enable
log_archive_dest_state_2 string enable
log_archive_dest_state_3 string enable
log_archive_dest_state_4 string enable
log_archive_dest_state_5 string enable
log_archive_dest_state_6 string enable
log_archive_dest_state_7 string enable
log_archive_dest_state_8 string enable
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_9 string enable
log_archive_duplex_dest string
log_archive_format string ARC%S_%R.%T
log_archive_local_first boolean TRUE
log_archive_max_processes integer 5
log_archive_min_succeed_dest integer 1
log_archive_start boolean FALSE
log_archive_trace integer 0
remote_archive_enable string true
standby_archive_dest string %ORACLE_HOME%RDBMS
驗證一下,歸檔日誌的位置:
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination C:archived_log
Oldest online log sequence 9
Next log sequence to archive 12
Current log sequence 12
做一次日誌切換,以便生成一個歸檔日誌。
SQL> alter system switch logfile;
System altered.
查詢所有的歸檔日誌
SQL> select name from v$archived_log;
NAME
--------------------------------------------------------------------------------
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_03_09O1_MF_1_
8_3X5RW8GL_.ARC
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_03_09O1_MF_1_
9_3X648598_.ARC

NAME
--------------------------------------------------------------------------------
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_03_09O1_MF_1_
10_3X69DJRW_.ARC
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_03_09O1_MF_1_
11_3X69FFCQ_.ARC

D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_03_20O1_MF_1_
15_3Y47HLK2_.ARC
NAME
--------------------------------------------------------------------------------
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_03_20O1_MF_1_
16_3Y47KLQX_.ARC
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_03_20O1_MF_1_
17_3Y47Q49R_.ARC
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_03_20O1_MF_1_
18_3Y48HDRW_.ARC
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_03_23O1_MF_1_
NAME
--------------------------------------------------------------------------------
1_3YC581RZ_.ARC
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_03_23O1_MF_1_
2_3YCS92B8_.ARC
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_03_24O1_MF_1_
3_3YG9PV1G_.ARC
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_03_24O1_MF_1_
4_3YHFORLK_.ARC

NAME
--------------------------------------------------------------------------------
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_04_11O1_MF_1_
5_3ZXLF75V_.ARC
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_04_11O1_MF_1_
6_3ZXN6BVT_.ARC
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_04_11O1_MF_1_
7_3ZYK84NZ_.ARC
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_04_11O1_MF_1_
8_3ZYK8JPY_.ARC
NAME
--------------------------------------------------------------------------------
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_04_14O1_MF_1_
9_406C9RWB_.ARC
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_04_15O1_MF_1_
10_408RKOXS_.ARC
D:ORACLEPRODUCT10.2.0FLASH_RECOVERY_AREAORCLARCHIVELOG2008_04_15O1_MF_1_
11_409M5CWB_.ARC
C:ARCHIVED_LOGARC00012_0649874156.001
28 rows selected.
請留意,以上生成的 歸檔日誌檔案的位置,名字和 以前的都不同了。 歸檔日誌的檔名,按照 log_archive_format 的設定來的,以前的是系統自己生成的,不知道具體含義。
SQL> show parameter arch
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
archive_lag_target integer 0
log_archive_config string
log_archive_dest string
log_archive_dest_1 string location=C:archived_loglog_archive_dest_10 string
log_archive_dest_2 string
log_archive_dest_3 string
log_archive_dest_4 string
log_archive_dest_5 string
log_archive_dest_6 string
log_archive_dest_7 string
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_8 string
log_archive_dest_9 string
log_archive_dest_state_1 string enable
log_archive_dest_state_10 string enable
log_archive_dest_state_2 string enable
log_archive_dest_state_3 string enable
log_archive_dest_state_4 string enable
log_archive_dest_state_5 string enable
log_archive_dest_state_6 string enable
log_archive_dest_state_7 string enable
log_archive_dest_state_8 string enable
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_9 string enable
log_archive_duplex_dest string
log_archive_format string ARC%S_%R.%Tlog_archive_local_first boolean TRUE
log_archive_max_processes integer 5
log_archive_min_succeed_dest integer 1
log_archive_start boolean FALSE
log_archive_trace integer 0
remote_archive_enable string true
standby_archive_dest string %ORACLE_HOME%RDBMS
[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/66634/viewspace-1002623/,如需轉載,請註明出處,否則將追究法律責任。

相關文章