db_recovery_file_dest:指定閃回恢復(fù)區(qū)路徑。
log_archive_dest:指定歸檔日志存放路徑,必須是本地磁盤。對(duì)于企業(yè)版,這個(gè)參數(shù)是不贊成使用的,推薦使用log_archive_dest_n。如果是非企業(yè)版或者企業(yè)版但沒(méi)有指定log_archive_dest_n參數(shù),這個(gè)參數(shù)才是有效的。For EnterPRise Edition users, this parameter has been deprecated in favor of the LOG_ARCHIVE_DEST_n parameters. If Oracle Enterprise Edition is not installed or it is installed, but you have not specified any LOG_ARCHIVE_DEST_n parameters, this parameter is valid.
log_archive_dest_n:指定歸檔日志存放路徑,n最大為31。可以為本地磁盤或者網(wǎng)絡(luò)地址。
此參數(shù)有如如下取值:
Syntax LOG_ARCHIVE_DEST_[1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31] ={ null_string |{ LOCATION=path_name | SERVICE=service_name }[ MANDATORY ][ REOPEN[=seconds] ][ DELAY[=minutes] ][ NOREGISTER ][ TEMPLATE=template ][ ALTERNATE=destination ][ MAX_FAILURE=count ][ SYNC | ASYNC ][ AFFIRM | NOAFFIRM ][ NET_TIMEOUT=seconds ][ VALID_FOR=(redo_log_type,database_role) ][ DB_UNIQUE_NAME ][ MAX_CONNECTIONS=count ][ COMPRESSION={ENABLE|DISABLE} ]}Default value There is no default value.Modifiable ALTER session, ALTER SYSTEMBasic Yes。
其中,LOG_ARCHIVE_DEST_11一直到LOG_ARCHIVE_DEST_31不支持SYNC, ARCH, LOCATION, MANDATORY, or ALTERNATE attributes, and cannot be specified asthe target of the ALTERNATE 這些個(gè)參數(shù),并且不可以被指定為alternate 參數(shù)的值。鑒于LOG_ARCHIVE_DEST_n第一個(gè)參數(shù)必須指定location或者service。所以11到30只能指定service了。并且在兼容性參數(shù)設(shè)置為11.2.0或更高的時(shí)候,才可以使用這些參數(shù)。
Destinations LOG_ARCHIVE_DEST_11 through LOG_ARCHIVE_DEST_31 do not support the SYNC, ARCH, LOCATION, MANDATORY, or ALTERNATE attributes, and cannot be specified as the target of the ALTERNATE attribute. LOG_ARCHIVE_DEST_11 through LOG_ARCHIVE_DEST_31 can only be used when the COMPATIBLE initialization parameter is set to 11.2.0 or higher.
對(duì)三者之間的關(guān)系說(shuō)明如下:
db_recovery_file_dest,閃回恢復(fù)路徑,可以與log_archive_dest_n共存。不可以與log_archive_dest共存。若設(shè)置了db_recovery_file_dest,則不可以再設(shè)置log_archive_dest。但是可以設(shè)置log_archive_dest_n。
如果想將日志歸檔在db_recovery_file_dest所指定的路徑下,可以設(shè)置log_archive_dest_n='location=USE_DB_RECOVERY_FILE_DEST',同時(shí)設(shè)置log_archive_dest_state_n='enable'。若只設(shè)置了db_recovery_file_dest和一個(gè)log_archive_dest_n,并且兩者路徑不同,日志只會(huì)歸檔在log_archive_dest_n指定的路徑下。
LOG_ARCHIVE_DEST只能與LOG_ARCHIVE_DUPLEX_DEST共存,兩者一個(gè)為主路徑,一個(gè)為從路徑。必須都位于本地磁盤。
當(dāng)db_recovery_file_dest、log_archive_dest、log_archive_dest_n都沒(méi)有設(shè)置時(shí),歸檔日志會(huì)存放在$ORACLE_HOME/dbs/arch/目錄下。注意,如果未設(shè)置db_recovery_file_dest,則需關(guān)閉閃回特性。alter database Flashback off;
SQL> alter system set db_recovery_file_dest='';System altered.SQL> archivelog list;SP2-0734: unknown command beginning "archivelog..." - rest of line ignored.SQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination /home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/archOldest online log sequence 1015Next log sequence to archive 1019Current log sequence 1019SQL> alter system set ¶meter='¶_value';Enter value for parameter: db_recovery_file_dest Enter value for para_value: /home/oracle/app/oracle/fast_recovery_area1old 1: alter system set ¶meter='¶_value'new 1: alter system set db_recovery_file_dest='/home/oracle/app/oracle/fast_recovery_area1'System altered.SQL> SQL> SQL> SQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination USE_DB_RECOVERY_FILE_DESTOldest online log sequence 1015Next log sequence to archive 1019Current log sequence 1019
如
新聞熱點(diǎn)
疑難解答
圖片精選