Tutorials to .com

Tutorials to .com » Database » Oracle » Oracle10g Flashback Recovery Area Xiangjie

Oracle10g Flashback Recovery Area Xiangjie

Print View , by: iSee ,Total views: 14 ,Word Count: 1927 ,Date: Mon, 24 Aug 2009 Time: 3:59 AM

What is flash Recovery Area

oracle 10g has a new feature called: Automatic Disk-Based Backup and Recovery (Automatic Disk-Based Backup and Recovery). The basis for achieving the functionality described in the article to be flash recovery area (Flash Recovery Area). Flashback Recovery Area in Oracle 10g is a new thing. Simply put, a flash recovery area is used to store recovery-related files of storage space. Allows users to centrally store all recovery-related files.

Flash recovery area can be placed in several storage form below:

  • Contents
  • A file system
  • Automatic Storage Management (ASM) disk group

In the RAC environment, this must be the location for the cluster file system (cluster file system), or asm disk group is controlled by or through the NFS file-sharing directory, but also note that all instances of the location and the operating system disk quota (disk quota) must be consistent.

The following types of documents can be placed in the flash recovery area:

  • Control file
  • Archived log files (Note: Oracle manuals mentioned in the flash recovery area set up after, LOG_ARCHIVE_DEST_10 the value will automatically be set to flash recovery area location, this change in the testing process I observed less than)
  • Flashback logs
  • Automatic backup control file and SPFILE
  • RMAN Backup Set
  • Copies of data files

Why do we use flash recovery area?

As mentioned above, flash recovery area provides a centralized storage area, largely reduced administrative overhead. This is its main advantage. RMAN can be used in conjunction with the rapid recovery.

In recent years, along with the development of storage technology, a single disk's storage capacity has been strengthened. This makes automated disk-based backup and recovery technology possible. The flash recovery area is precisely the disk-based backup and recovery foundation. The flash recovery area, and OMF and ASM is a more perfect combination of looks solution. Of course, it is undeniable that the automated backup and recovery technology is also far from mature.

Set the flash recovery area

If you use DBCA to create a database during installation can set flash recovery area location and size (Click here to view the installation screenshot) - This is the Oracle 10g OUI, one of the new features. If the beginning of the flash recovery area is not enabled, you can set up as follows.

Dynamic adjustment of the following two initialization parameters (no need to re-start the examples):

SQL> ALTER SYSTEM SET db_recovery_file_dest_size = 2g SCOPE = BOTH; System altered.SQL> SQL> ALTER SYSTEM SET db_recovery_file_dest =

'/ u01/app/oracle/flash_recovery_area' 2 SCOPE = BOTH; System altered.SQL>

See whether the changes made after the entry into force:

SQL> SHOW parameter db_recovery_file_destNAME TYPE VALUE ----------------------- --------- ----------- ---------------------- db_recovery_file_dest string / u01/app/oracle/flash_recovery_areadb_recovery_file_dest_size big integer 2GSQL>

As indicated above, we set the flash recovery area, the location / u01/app/oracle/flash_recovery_area, a maximum of 2G. If you want to remove flash recovery area, the initialization parameter DB_RECOVERY_FILE_DEST the value of the empty can.

Note: DB_RECOVERY_FILE_DEST_SIZE only DB_RECOVERY_FILE_DEST be empty after emptied.

Initialization parameter setting db_recovery_file_dest_size a little place to note:

  • Document No. 0 and the operating system space the size of the data block header is not included
  • This parameter does not represent the actual size of the space. If the space is compressed, mirrored, RAID, then the value of the parameter is not the same meaning
Manage and monitor flash recovery area

Let's take a look at Flashback to restore the region hierarchy of the text frame

SQL> host tree / u01/app/oracle/flash_recovery_area/u01/app/oracle/flash_recovery_area | - DEMO | | - archivelog | | | - 2004_12_07 | | | | - o1_mf_1_10_0vbwz2fm_.arc | | | | -- o1_mf_1_11_0vc1yj14_.arc | | | | - o1_mf_1_12_0vc6vvws_.arc | | | | - o1_mf_1_13_0vcbv6cg_.arc | | | | - o1_mf_1_14_0vchlxb3_.arc | | | | - o1_mf_1_15_0vcnBbz_.arc | | | | - o1_mf_1_5_0vbk8goo_.arc | | | | - o1_mf_1_6_0vbkq6dk_.arc | | | | - o1_mf_1_7_0vbktl5f_.arc | | | | - o1_mf_1_8_0vbo97xp_.arc | | | `- o1_mf_1_9_0vbrrlo6_.arc | |` - 2004_12_08 | | | - o1_mf_1_16_0vcnyqvf_.arc | | | - o1_mf_1_17_0vcp58bj_.arc | | | - o1_mf_1_18_0vcv4qxb_.arc | | | - o1_mf_1_19_0vczcsl0_.arc | | | - o1_mf_1_20_0vd34svw_.arc | | | - o1_mf_1_21_0vd7tg4h_.arc | | | - o1_mf_1_22_0vddq7lc_.arc | | | -- - o1_mf_1_23_0vdk0nbh_.arc | | | - o1_mf_1_24_0vdojjky_.arc | | | - o1_mf_1_25_0vdtg1rq_.arc | | | - o1_mf_1_26_0vdz23B_.arc | | | - o1_mf_1_27_0vf3nlnw_.arc | | | - o1_mf_1_28_0vf6hon5_.arc | | | - o1_mf_1_29_0vf867lt_ . arc | | | - o1_mf_1_30_0vf86pkg_.arc | | `- o1_mf_1_31_0vfjphqm_.arc |` - backupset | | - 2004_12_07 | | | - o1_mf_ncsn1_TAG20041207T150715_0vboq7kv_.bkp | | `- o1_mf_nnnd1_TAG20041207T150715_0vboo3t2_.bkp |` - 2004_12_08 | | - o1_mf_ncsnf_TAG20041208T161219_0vffxv2n_.bkp | | - o1_mf_ncsnf_TAG20041208T165456_0vfjcvgl_.bkp | `- o1_mf_nnndf_TAG20041208T161219_0vffv40q_.bkp` - tracking.dbf7 directories, 33 files

Flash recovery area to add or remove files and other changes will be recorded in the database alert log, Oracle 10g also against the new feature provides a new view, DBA_OUTSTANDING_ALERTS, through which the view can be relevant information.

DBA_OUTSTANDING_ALERTS view reflects the existence of even more human side of Oracle. Let's look at the view of the basic structure will be used later.

SQL> DESC dba_outstanding_alerts Name Null? Type ------------------------------- ----------- ----------------- SEQUENCE_ID NUMBER REASON_ID NOT NULL NUMBER OWNER VARCHAR2 (30) OBJECT_NAME VARCHAR2 (513) SUBOBJECT _NAME VARCHAR2 (30) OBJECT_TYPE VARCHAR2 (64) REASON VARCHAR2 (4000) TIME_SUGGESTED TIMESTAMP (6) WITH TIME ZONE CREATION_TIME TIMESTAMP (6) WITH TIME ZONE SUGGESTED_ACTION VARCHAR2 (4000) ADVISOR_NAME VARCHAR2 (30) METRIC_VALUE NUMBER MESSAGE_TYPE VARCHAR2 (12) MESSAGE _GROUP VARCHAR2 (64) MESSAGE _LEVEL NUMBER HOSTING_CLIENT_ID VARCHAR2 (64) MODULE_ID VARCHAR2 (64) PROCESS _ID VARCHAR2 (128) HOST_ID VARCHAR2 (256) HOST_NW_ADDR VARCHAR2 (256) INSTANCE _NAME VARCHAR2 (16) INSTANCE _NUMBER NUMBER USER_ID VARCHAR2 (30) EXECUTION _CONTEXT_ID VARCHAR2 (60) ERROR_INSTANCE_ID VARCHAR2 (142) SQL>

10g of the new view V $ RECOVERY_FILE_DEST flash recovery area that contains the relevant information:

SQL> desc V $ RECOVERY_FILE_DEST Name Null? Type ------------------------------- --------- ------------------- NAME VARCHAR2 (513) SPACE_LIMIT NUMBER SPACE_USED NUMBER SPACE_RECLAIMABLE NUMBER NUMBER_OF_FILES NUMBERSQL> SELECT NAME, space_limit, space_used, space_reclaimable space_rec, 2 number_of_files file_num 3 FROM v $ recovery_file_dest; NAME SPACE_LIMIT SPACE_USED SPACE_REC FILE_NUM --------------------------- ----------- ----- ----- ---------- ----------/u01/app/oracle/flash_recovery_area 2147483648 1106849280 602410496 30SQL>

10g Dynamic views in a number of years (V $ CONTROLFILE, V $ LOGFILE, V $ ARCHIVED_LOG, V $ DATAFILE_COPY, etc.) of the new column IS_RECOVERY_DEST_FILE, whether the relevant documents specified at the resumption of the district.

SQL> SELECT recid, blocks, is_recovery_dest_file 2 FROM v $ archived_log 3 WHERE recid <5; RECID BLOCKS IS_RECOVERY_DEST_FILE ---------- ---------- -------- --------------------- 1 20072 YES 2 19566 YES 3 19566 YES 4 19566 YESSQL>

Files in flash recovery area to maintain the strategy of

  • Persistent file from being deleted.
  • RMAN configure a policy through the date the file will be deleted.
  • Tape has been copied to a temporary file will be deleted.
  • In the Data Guard environment, when the archived redo log files from the flash recovery area can be removed, they can use archived redo log deletion policy to be automatically deleted (in the Recovery Manager in CONFIGURE ARCHIVELOG DELETION POLICY TO .. ....)

In the flash recovery area space in use for more than 85% of the time, the database files will be written to the alert warning information. And when more than 97% of the time will be to write a serious warning message. When the flash recovery area when space is not enough, Oracle will report an error similar to the following:

ORA-19809: limit exceeded for recovery filesORA-19804: cannot reclaim 52428800 bytes disk space from 1258291200 limit

This time query dba_outstanding_alerts:

SQL> select reason, object_type,

suggested_action from dba_outstanding_alerts; REASON OBJECT_TYPE SUGGESTED_ACTION ------------------------------ ------------- - ------------------------------------- db_recovery_file_dest_size of RECOVERY AREA Add disk space and increase db_recovery_1258291200 bytes is 88.20% use file_dest_size, backup files to tertiaryd and has 148509184 remaining device, delete files from recovery areabytes available. using RMAN, consider changing RMAN rete ntion policy or consider changing RMAN a rchivelog deletion policy.1 rows selected.SQL>

Will give the reasons and recommendations related to the operation.

Notes

Automated things always give uncertainty. If you are in a test environment to enable the flash recovery area, you must pay attention to monitor the use of space. In the production database using (if there is such a person's words), it is imperative flash recovery area into a separate disk.

(Editor: Ming Ming mingming_ky@126.com TEL: (010) 68476606)




Oracle Tutorial Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.