In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you an example analysis of the Oracle10g flashback recovery area, which is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
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 implementation of this function is based on the flashback recovery area (Flash Recovery Area) described in this article. The flashback recovery area is new in Oracle 10g. In a nutshell, a flashback recovery area is a piece of storage space used to store files related to recovery. Allows users to store all recovery-related files centrally.
The flashback recovery area can be placed in the following forms of storage:
Catalogue
A file system
Automatic Storage Management (ASM) disk group
In a RAC environment, this location must be a cluster file system (cluster file system) or an ASM disk group or a file share directory controlled by NFS, and note that the location of all instances must be the same as the operating system's disk quota (disk quota).
The following files can be placed in the flashback recovery area:
Control file
Archived log file (Note: according to the Oracle manual, after setting flash recovery area, the value of LOG_ARCHIVE_DEST_10 will be automatically set to the location of flash recovery area, which cannot be observed during the author's test)
Flashback log
Control automatic backup of files and SPFILE
RMAN backup set
Data file copy
Why use the flashback recovery area?
As mentioned earlier, the flashback recovery area provides a centralized storage area, greatly reducing administrative overhead. This is its main advantage. It can be used in combination with RMAN for quick recovery.
In recent years, with the development of storage technology, the storage capacity of a single disk has been enhanced. This makes it possible to implement automatic disk-based backup and recovery technology. The flashback recovery area is the basis of disk-based backup and recovery. The combination of flashback recovery area and OMF with ASM seems to be a perfect solution. Of course, it is undeniable that the automatic backup and recovery technology is far from mature.
Set flashback recovery area
If you use a database created by DBCA, you can set the location and size of the flashback recovery area during installation (click here to see 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, you can set it as follows.
Adjust the following two dynamic initialization parameters (no need to restart the instance):
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 >
Then check to see if the changes take effect:
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 shown above, we set the flashback recovery area at / u01/app/oracle/flash_recovery_area, with an upper limit of 2G. If you want to undo the flashback recovery area, clear the value of the initialization parameter DB_RECOVERY_FILE_DEST.
Note: DB_RECOVERY_FILE_DEST_SIZE can be emptied only after the DB_RECOVERY_FILE_DEST has been emptied.
There are a few things to note when setting the initialization parameter db_recovery_file_dest_size:
Block 0 of the file and the space size of the operating system data block are not included
This parameter does not represent the amount of space actually occupied. If the space is compressed, mirrored and RAID, the value meaning of this parameter is different.
Manage and monitor flashback recovery area
Let's first take a look at the shelf structure in the flashback recovery area.
SQL > host tree / u01/app/oracle/flash_recovery_area/u01/app/oracle/flash_recovery_area |-- DEMO | |-- archivelog |-- 2004 / 12 / 007 | |-- o1_mf_1_10_0vbwz2fm_.arc |-- o1_mf_1_11_0vc1yj14_.arc | |-- o1_mf_1_12_0vc6vvws_.arc | |-- o1roommfroom1 _ 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 | |-- o1roommfSecret1 _ 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 | `--o1roommfSecretnnnndfTAG20041208T1612190vffv40q.bkp`-- tracking.dbf7 directories 33 files
Changes such as adding or deleting files in the flashback recovery area will be recorded in the alert log of the database, and Oracle 10g also provides a new view for this new feature, DBA_OUTSTANDING_ALERTS, through which you can get relevant information.
The existence of the DBA_OUTSTANDING_ALERTS view reflects the more human side of Oracle. Let's first take a look at the basic structure of the view, which 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 (4000) 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 >
The new view V$RECOVERY_FILE_DEST of 10g contains information about the flashback recovery area:
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 >
The new column IS_RECOVERY_DEST_FILE in some 10g dynamic views (V$CONTROLFILE, V$LOGFILE, V$ARCHIVED_LOG, V$DATAFILE_COPY, etc.) indicates whether the relevant files are in the recovery area.
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>Retention strategy of files in flashback recovery area
Persistent files are never deleted.
Files that have expired through the RMAN configuration policy are deleted.
Temporary files that have been copied to the tape will be deleted.
In the Data Guard environment, when archived redo log files can be deleted from the flashback recovery area, the archived redo log deletion policy can be applied to automatically delete (in the recovery manager CONFIGURE ARCHIVELOG DELETION POLICY TO.)
When more than 85% of the space in the flashback recovery area is used, the database will write an alarm to the alert file. When it exceeds 97%, serious alarm information will be written. When there is not enough space in the flashback recovery area, 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
Query dba_outstanding_alerts at this time:
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 >
The relevant reasons and recommended actions will be given.
Matters needing attention
Automated things always give people uncertainty. If you enable the flashback recovery area in the test environment, be sure to pay attention to the use of monitoring space. For use on the production database (if there is such a person), the flashback recovery area must be placed on a separate disk.
The above is an example analysis of the Oracle10g flashback recovery area. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.