052试题 74 - FRA和log_archive_dest_n参数

题目:

74. The database is running in ARCHIVELOG mode. Examine the initialization parameters and their values set to enable archiving on your database server:
LOG_ARCHIVE_FORMAT = arch_%t_%s_%r.arc
LOG_ARCHIVE_DEST_1 = 'LOCATION = /disk1/archive'
DB_RECOVERY_FILE_DEST = '/u01/oradata'
DB_RECOVERY_FILE_DEST_SIZE = 20G
Which statement is true regarding the archived redo log files?
A.It will be created on the local file system.
B.It will be created only in the Flash Recovery Area.
C.It will be created in the location specified by the LOG_ARCHIVE_DEST_1 parameter and the default location $ORACLE_HOME/dbs.
D.It will be created in the location specified by the LOG_ARCHIVE_DEST_1 parameter and location specified by the DB_RECOVERY_FILE_DEST parameter.

参考答案 A

解析
题目意思是数据库运行在归档模式下,并且同时设置了log_archive_dest_1参数和db_recovery_file_dest参数。问归档文件会怎么样?
同时设置这两个参数的话,log_archive_dest_1参数会生效,所以归档会存放在log_archive_dest_1指定的路径下。所以A正确。BCD错误。

参考文档:

Method 1: Using the LOG_ARCHIVE_DEST_n Parameter

Use the LOG_ARCHIVE_DEST_n parameter (where n is an integer from 1 to 31) to specify from one to 31 different destinations for archived logs. Each numerically suffixed parameter uniquely identifies an individual destination.

You specify the location for LOG_ARCHIVE_DEST_n using the keywords explained in the following table:

KeywordIndicatesExample
LOCATIONA local file system location or Oracle ASM disk groupLOG_ARCHIVE_DEST_n = 'LOCATION=/disk1/arc'

LOG_ARCHIVE_DEST_n = 'LOCATION=+DGROUP1/orcl/arc_1'

LOCATIONThe Fast Recovery AreaLOG_ARCHIVE_DEST_n = 'LOCATION=USE_DB_RECOVERY_FILE_DEST'
SERVICERemote archival through Oracle Net service name.LOG_ARCHIVE_DEST_n = 'SERVICE=standby1'

 

If you use the LOCATION keyword, specify one of the following:

  • A valid path name in your operating system's local file system

  • An Oracle ASM disk group

  • The keyword USE_DB_RECOVERY_FILE_DEST to indicate the Fast Recovery Area

If you specify SERVICE, supply a net service name that Oracle Net can resolve to a connect descriptor for a standby database. The connect descriptor contains the information necessary for connecting to the remote database.

Perform the following steps to set the destination for archived redo logs using the LOG_ARCHIVE_DEST_n initialization parameter:

  1. Set the LOG_ARCHIVE_DEST_n initialization parameter to specify from one to 31 archiving locations. For example, enter:

    LOG_ARCHIVE_DEST_1 = 'LOCATION = /disk1/archive'
    LOG_ARCHIVE_DEST_2 = 'LOCATION = /disk2/archive'
    LOG_ARCHIVE_DEST_3 = 'LOCATION = +RECOVERY/orcl/arc_3'
    

    If you are archiving to a standby database, then use the SERVICE keyword to specify a valid net service name. For example, enter:

    LOG_ARCHIVE_DEST_4 = 'SERVICE = standby1'
    
  2. Optionally, set the LOG_ARCHIVE_FORMAT initialization parameter, using %t to include the thread number as part of the file name, %s to include the log sequence number, and %r to include the resetlogs ID (a timestamp value represented in ub4). Use capital letters (%T, %S, and %R) to pad the file name to the left with zeroes.

    Note:

    If the COMPATIBLE initialization parameter is set to 10.0.0 or higher, the database requires the specification of resetlogs ID (%r) when you include the LOG_ARCHIVE_FORMAT parameter. The default for this parameter is operating system dependent.

    The incarnation of a database changes when you open it with the RESETLOGS option. Specifying %r causes the database to capture the resetlogs ID in the archived redo log file name. See Oracle Database Backup and Recovery User's Guide for more information about this method of recovery.

    The following example shows a setting of LOG_ARCHIVE_FORMAT:

    LOG_ARCHIVE_FORMAT = arch_%t_%s_%r.arc
    

    This setting will generate archived logs as follows for thread 1; log sequence numbers 100, 101, and 102; resetlogs ID 509210197. The identical resetlogs ID indicates that the files are all from the same database incarnation:

    /disk1/archive/arch_1_100_509210197.arc, 
    /disk1/archive/arch_1_101_509210197.arc, 
    /disk1/archive/arch_1_102_509210197.arc
    
    /disk2/archive/arch_1_100_509210197.arc, 
    /disk2/archive/arch_1_101_509210197.arc, 
    /disk2/archive/arch_1_102_509210197.arc
    
    /disk3/archive/arch_1_100_509210197.arc, 
    /disk3/archive/arch_1_101_509210197.arc, 
    /disk3/archive/arch_1_102_509210197.arc
    

end

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值