Configuring file creation in Flash recovery area and order of Precedence (文档 ID 305810.1)

本文介绍Oracle 10G中Flash Recovery Area的新特性及其配置方法,包括在线重做日志、控制文件及归档日志的创建位置与优先级顺序,并推荐使用Flash Recovery Area进行归档日志管理。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

***Checked for relevance on 9-Sep-2013***


PURPOSE
-------

Configuring file creation in Flash Recovery Area and order of 
precedence for these Files 
 
SCOPE & APPLICATION
-------------------

 New Feature in Oracle10G and for DBAs, support 

 

Configuring Online RedoLog Creation in the Flash Recovery Area 
================================================================

The following statements can create online redologs in the Flash 
Recovery Area:
  - CREATE DATABASE
  - ALTER DATABASE ADD LOGFILE
  - ALTER DATABASE ADD STANDBY LOGFILE
  - ALTER DATABASE OPEN RESETLOGS

The default size of an online redolog created in the Flash Recovery Area  is 100 MB. 
The log member filenames are automatically generated by the database.

The initialization parameters that determine where online redolog files are 
created are DB_CREATE_ONLINE_LOG_DEST_n, DB_RECOVERY_FILE_DEST and 
DB_CREATE_FILE_DEST. 


Order of Precedence for Online Redo Log Creation
====================================================

o  If DB_CREATE_ONLINE_LOG_DEST_n is specified, an online redolog file member is 
   created in each directory up to MAXLOGMEMBERS for the database. No online 
   redologs are created in the Flash Recovery Area  .

o  If the DB_CREATE_FILE_DEST and DB_RECOVERY_FILE_DEST parameters are specified, 
   and if the DB_CREATE_ONLINE_LOG_DEST_n parameter is not specified, an online 
   redolog file member is created in both DB_CREATE_FILE_DEST and 
   DB_RECOVERY_FILE_DEST up to MAXLOGMEMBERS. The file in DB_CREATE_FILE_DEST is 
   the first member. 

o  If DB_RECOVERY_FILE_DEST is specified and DB_CREATE_FILE_DEST or 
   DB_CREATE_ONLINE_LOG_DEST_n are not specified, an online redolog file member is 
   created in DB_RECOVERY_FILE_DEST. 

o  If DB_CREATE_ONLINE_LOG_DEST_n, DB_CREATE_FILE_DEST, or
   DB_RECOVERY_FILE_DEST are all not specified, an online redo log file is 
   created in an operating system' specific default location (eq $ORACLE_HOME/dbs).
   The file is not created as an Oracle Manager File (OMF).



Configuring Control File Creation in the Flash Recovery Area 
==============================================================

The initialization parameters CONTROL_FILES,  DB_CREATE_ONLINE_LOG_DEST_n,  
DB_RECOVERY_FILE_DEST, and DB_CREATE_FILE_DEST all interact to determine the 
location where the database control files are created

If the database creates an Oracle managed control file, and if the database 
uses a server parameter file (SPFILE), then the database changes the CONTROL_FILES 
initialization parameter in the server parameter file (SPFILE). If the database uses a 
client-side initialization parameter file (PFILE), then change the CONTROL_FILES 
initialization parameter manually in the client-side parameter file (PFILE) after the
contolfiles have been created.


Order of Precedence for Control File Creation
===============================================

o   If DB_CREATE_ONLINE_LOG_DEST_n is specified, an OMF control file is 
    created in each directory. The file in the first directory is the 
    primary control file. No control file is created in the Flash Recovery Area .

o   If DB_CREATE_FILE_DEST and DB_RECOVERY_FILE_DEST are specified, and if
    DB_CREATE_ONLINE_LOG_DEST_n is not specified, an OMF control file is created 
    in both DB_CREATE_FILE_DEST and DB_RECOVERY_FILE_DEST. The file in the
    DB_CREATE_FILE_DEST is the primary control file.

o   If DB_RECOVERY_FILE_DEST is specified and DB_CREATE_ONLINE_LOG_DEST_n or
    DB_CREATE_FILE_DEST are not specified, an OMF control file is created in
    DB_RECOVERY_FILE_DEST.

o   If DB_CREATE_ONLINE_LOG_DEST_n, DB_CREATE_FILE_DEST, and
    DB_RECOVERY_FILE_DEST are not specified, a control file is created in an 
    operating system' specific default location. This control files are not 
    in OMF format.


Archived Redo Log Creation in the Flash Recovery Area 
======================================================

It is recommended that you the use Flash Recovery Area as an archivedlog 
location because the archived logs are automatically managed by the database. 
Whatever archiving scheme you choose, it is always advisable to create multiple 
copies of archived logs.

The following basic options are available, listed from most to least recommended:
1. Enable archiving to the Flash Recovery Area  and set other LOG_ARCHIVE_DEST_n 
   initialization parameter to locations outside the Flash Recovery Area .

2. Enable archiving to the Flash Recovery Area  only and use disk mirroring to 
   create copies of the archived redo logs.

3. Set LOG_ARCHIVE_DEST_n initialization parameters to archive only to
   none-Flash Recovery Area  locations.

Using the Flash Recovery Area, ommits the use of LOG_ARCHIVE_DEST 
and LOG_ARCHIVE_DUPLEX_DEST initialization parameters. Use the 
LOG_ARCHIVE_DEST_n parameters instead, which have somewhat different semantics.
Once a database is using LOG_ARCHIVE_DEST_n, it can configure a Flash 
Recovery Area.


Order of Precedence for Archive log file Creation
====================================================
The interactions among different initialization parameters affecting redo 
log archiving desintations are as follows:

o  If LOG_ARCHIVE_DEST (and, optionally, LOG_ARCHIVE_DUPLEX_DEST) is set, these 
   parameters will specify the only redolog archiving destinations.

o  If DB_RECOVERY_FILE_DEST is specified (that is, if a Flash Recovery Area  is
   configured) and no LOG_ARCHIVE_DEST_n is specified, then LOG_ARCHIVE_DEST_10 
   is implicitly set to the Flash Recovery Area. 
   This behaviour can be overrulled by explicitly setting 
   LOG_ARCHIVE_DEST_10 to an empty string. 

o  If you set any local destinations for LOG_ARCHIVE_DEST_n, then archived redo
   logs are stored only in the specified destinations. 
   In this case, redolog files are not archived in the Flash Recovery Area  by 
   default. 


Changes in SQL Statement Behavior
===================================

- ALTER DATABASE
  o ADD LOGFILE and ADD STANDBY LOGFILE: If a file name is not provided and if 
    the initialization parameter DB_CREATE_ONLINE_LOG_DEST_n has not been defined, 
    then an online redolog file member is created in the Flash Recovery Area .
  o DROP LOGFILE: OMF online redolog file members in the Flash Recovery Area  
    are deleted.
  o RENAME FILE: The old filename can be an OMF Flash Recovery Area  filename. 
    If the file exists, it is deleted.

- CREATE CONTROLFILE
  The control file is created in the file specified by the CONTROL_FILES 
  initialization parameter or in the default control file destination according 
  to the order of precedence.

- CREATE DATABASE
  If CONTROL_FILES is not set and at least one of DB_CREATE_FILE_DEST,
  DB_CREATE_ONLINE_LOG_DEST_n, and DB_RECOVERY_FILE_DEST is set, then
  the control file is created in the default destination following the order of 
  precedence. If the LOGFILE clause is omitted and at least one of 
  DB_CREATE_FILE_DEST, DB_RECOVERY_FILE_DEST, and DB_CREATE_ONLINE_LOG_DEST_n is 
  set, the members are created in the default destination

Note :-  

If both db_create_online_log_dest_n and db_recovery_file_dest are specified in 
the init parameters and both have same destination, it could cause the 
following warning message to be logged in the alert log:
WARNING: db_create_online_log_dest_2 is same as db_recovery_file_dest


REFERENCE
----------
Note 305817.1 FAQ - Flash Recovery Area  feature of 10G
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值