Talking about Oracle 10G Flash Restoration Area

xiaoxiao2021-03-06  42

What is the flashback recovery area

Oracle 10g has a new feature called: Automatic disk-based backup and recovery (Automatic Disk-based Backup and Recovery). The basis of implementing this function is the flash recovery area of ​​this article. Flashback recovery area is new things in Oracle 10g. Simply put, the flashback recovery area is a storage space for storing the recovered file. Allow users to centrally store all recovery related files.

Flashback recovery area can be placed in the following storage form:

l catalog

l A file system

l Auto Storage Management (ASM) Disk Group

In the RAC environment, this location must be a cluster file system or an ASM disk group or through NFS-controlled file sharing directory, but also note that all instances of the location and disk limit of the operating system (Disk Quota) must be consistent.

The following files can be placed in the flash recovery area:

l Control file

l Archive log file (Note: After setting Flash Recovery Area, the value of log_archive_dest_10 is automatically set to the location of Flash Recovery Area, which is not observed during the author test.

l flashback log

l Control file and SPFILE auto backup

l RMAN backup set

l Data file copy

Why do you use a flashback recovery area?

As mentioned earlier, the flashback recovery area provides a centralized storage area to a largely reduced management overhead. This is its most important advantage. Use RMAN combined with quick recovery.

In recent years, with the development of storage technology, the storage capacity of a single disk has been strengthened. This makes the automatic disk-based backup and recovery technology implementation. The flash recovery zone is just the basis for the backup and recovery of the disk. The combination of flashback recovery zone and OMF and ASM appear to be a relatively perfect solution. Of course, it is undeniable that automatic backup recovery technology is still not mature enough.

Set flashback recovery area

If you create a database created by DBCA, you can set the location and size of the flashback recovery area when installing (click here to view the installation screenshot) - this is also one of the new features of Oracle 10g OUI. If the flashback recovery area is not enabled at the beginning, it can be set as follows. Adjust the two dynamic initialization parameters (no need to restart instances):

SQL> ALTER SESTEM SET DB_RECOVERY_FILE_DEST_SIZE = 2G Scope = Both;

System altered.

SQL>

SQL> ALTER SESTEM SET DB_RECOVERY_FILE_DEST = '/ U01 / App / Oracle / Flash_Recovery_Area'

2 scope = Both;

System altered.

SQL>

After seeing to see if the changes have taken effect:

SQL> Show parameter db_recovery_file_dest

Name Type Value

-------------------------------------------------- -------------------------

DB_RECOVERY_FILE_DEST STRING / U01 / App / Oracle / Flash_Recovery_Area

DB_RECOVERY_FILE_DEST_SIZE BIG INTEGER 2G

SQL>

As shown above, we set the flashback recovery area, where the location is / U01 / App / Oracle / Flash_Recovery_Area, the upper limit is 2G. If you want to revoke the flashback recovery area, you can empty the value of the initial parameter db_recovery_file_dest. Note: DB_RECOVERY_FILE_DEST_SIZE can only be emptied after DB_RECOVERY_FILE_DEST.

Initialization parameter db_recovery_file_dest_size is a point where you need to pay attention:

l The size of the 0th block of the file and the operating system data block head is not included.

l This parameter does not mean the actual occupied space size. If the space is compressed, mirror, RAID, the value of this parameter is different.

Manage and monitor flashback recovery area

Let's take a look at the layout structure of the flashback recovery zone.

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_0VCNH2BZ_.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_0VDZ23H2_.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.dbf

7 Directories, 33 Files

Flashback recovery zone adds or deletes files and other variations in the Alert log of the database, Oracle 10G also provides a new view for this new feature, DBA_outstanding_alerts, which can be obtained by this view.

The existence of the DBA_outstanding_alerts view reflects the increasing people of Oracle. Let's first take a look at the basic structure of the view and it 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 varcha2 (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 varcha2 (12)

Message_group varchar2 (64)

Message_level Numberhosting_client_id varcha2 (64)

Module_ID VARCHAR2 (64)

Process_id varchar2 (128)

Host_id varchar2 (256)

HOST_NW_ADDR VARCHAR2 (256)

Instance_name varcha2 (16)

Instance_number number

User_id varchar2 (30)

Execution_Context_id varchar2 (60)

Error_Instance_id varchar2 (142)

SQL>

10g New View V $ Recovery_File_DEST contains information about flashback recovery area:

SQL> Desc V $ Recovery_File_Dest

Name NULL? TYPE

-------------------------------------------------- ---------------------------

Name varcha2 (513)

Space_limit Number

Space_Used Number

Space_reclaimable number Number

Number_of_files number

SQL> 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 30

SQL>

In some 10G dynamic views (V $ ControlFile, V $ logfile, v $ archived_log, v $ datafile_copy, etc.) indicate whether the relevant file is in the recovery zone. 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 YES

SQL>

Flashback Recovery Area in Fuser

l The lasting file will never be deleted.

l The file that expires through the RMAN configuration policy will be deleted.

l The temporary file that has been copied to the tape will be deleted.

l In the Data Guard environment, when the archived recovery log file can be removed from the flashback recovery area, the archive can be applied to automatically delete (Configure ArchiveLog deleion policy in the recovery manager). .....)

When the space in the flash recovery area is more than 85%, the database will write alarm information to the Alert file. The serious alarm information will be written while more than 97%. When the flashback recovery area is not enough, Oracle will report a similar error:

ORA-19809: Limit Exceeded for Recovery Files

ORA-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 ILE_DEST_SIZE, Backup Files To Tertiary

D and HAS 148509184 Remaining Device, Delete Files from Recovery Area

Bytes Available. Using Rman, Consider Changing Rman Reten-

Tion Policy or Consider Changing Rman A

RchiveLog deletion policy.

1 rows selected.

SQL>

Will give relevant reasons and suggestions.

Precautions

Automated things always give people uncertainty. If you enable the flashback recovery area in the test environment, you must pay attention to the use of the monitoring space. Using (if such a person is available), you must put the flashback recovery zone onto a separate disk. Conclude

This article describes the basic functions of the flashback recovery area - Oracle 10G and a new feature -. In the subsequent document, I combine the new features of RMAN to show other aspects of the flashback recovery area.

Reference Information

Oracle Database Backup and Recovery Basics 10g Release 1 (10.1) Part Number B10735-01 At http://tahiti.oracle.com you can get the latest Oracle reference documentation.

转载请注明原文地址:https://www.9cbs.com/read-61651.html

New Post(0)