Home Database Mysql Tutorial Oracle 闪回区(Oracle Flash recovery area)

Oracle 闪回区(Oracle Flash recovery area)

Jun 07, 2016 pm 05:33 PM

Oracle闪回区已经有了好几载的岁月了,在10g的时候就被推出一直延续到现在。Oracle闪回区是为RMAN准备的,尽管抛开它我们可以同样

Oracle闪回区已经有了好几载的岁月了,在10g的时候就被推出一直延续到现在。Oracle闪回区是为RMAN准备的,尽管抛开它我们可以同样完成数据库备份恢复的相关工作,Oracle依旧强烈推荐使用且它让其成为RMAN的组件之一。这是因为该区域可集中简化管理所有和备份恢复工作,这也是其魅力所在。本文描述了Oracle闪回区的特性及其配置闪回区,监控闪回区等。

 1、闪回区特性及其配置

闪回区
  就是分配一个特定的目录位置(普通磁盘上的目录或ASM磁盘)来存放一些特定的恢复文件,用于集中和简化管理数据库恢复工作。
  通过配置闪回区,可以避免在多实例归档到相同磁盘时,磁盘空间耗尽而影响所有实例的情行。也就是说缩小影响范围。
  闪回区单词缩写为FRA,下面的描述FRA即指的是闪回区,也可能存在混用闪回区或FRA的情形。
 
闪回区可存储文件的类型
  完全的数据文件备份
  增量备份
  数据文件副本
  当前的控制文件,备份的控制文件,spfile文件,快照控制文件
  联机日志文件,归档日志
  块跟踪文件、闪回日志

启用与禁用闪回区
  设置下面的初始化参数(spfile或pfile文件)
    DB_RECOVERY_FILE_DEST_SIZE:用于设置闪回区的大小,此参数应优先于DB_RECOVERY_FILE_DEST参数修改,否则ORA-32001
    DB_RECOVERY_FILE_DEST:用于设置闪回区的目录
    DB_FLASHBACK_RETENTION_TARGET:指定数据库可以闪回的时间范围,单位为分钟,默认1440分钟,也就是一天
    数据库闪回分为多种情形,其闪回日志存放在FRA,可闪回的时间同时还取决于闪回恢复区的大小
    将DB_RECOVERY_FILE_DEST参数设置为空,可以停用FRA,但是启用flashback database,则不能取消FRA,需要先禁用flashback database
 
  数据库FRA可以为每个数据库配置不同的闪回区,也可以为多个数据库配置相同路径的闪回区
  当为多个数据库配置相同的闪回区位置时,应考虑闪回区所在磁盘挂载点的总大小以及使用不同的DB_NAME
  多个数据库或实例使用相同的闪回区时,其路径为:FRA_HOME////

FRA中的保留策略
  FRA中的文件的保留与否由RMAN保留策略来决定。通过执行RMAN configure retention policy命令来设置其策略
  对于没有关联保留策略或是永久文件,文件永远不会被删除
  对于关联保留策略的文件,没有过时的情况下不会被删除,一旦过时,在空间压力下回自动被删除

FRA与多路日志归档
  如果设置了归档日志参数log_archive_dest_n,归当时会使用该位置而不是使用FRA
  如果未设置参数log_archive_dest_n,而是启用FRA,则可以不需要再单独设置归档日志参数log_archive_dest_n,归档日志会位于FRA
  对于启用FRA后,不可再设置log_archive_dest、log_archive_duplex_dest,也就是说存在排他模式。可参考:Oracle 归档日志 
  对于既要归档到log_archive_dest_n,又要归档到FRA的情形,需要设置参数log_archive_dest_10(缺省情况)给FRA,如下:
      alter system set log_archive_dest_10='LOCATION=USE_DB_RECOVERY_FILE_DEST';
      alter system set log_archive_dest_1='LOCATION=/u03/database/archdir';
 
2、FRA空间分配与监控
  对于启用FRA特性之后,FRA帮助管理全部的磁盘空间分配。Oracle会自动监控FRA空间的使用情况。
  关于FRA空间分配大小应考虑当前数据库备份的方式,备份是否压缩,每天归档日志大小,是否启用了闪回等多项因素综合来考量
  FRA中可用空间达到不安全的程度或不够用的情形,可以通过OEM或DBA_OUTSTANDING_ALERTS获得相关信息
    会在Alert日志文件中生成警告
    当可回收空间低于DB_RECOVERY_FILE_DEST_SIZE定义值的15%时,生成警报
    当可回收空间低于DB_RECOVERY_FILE_DEST_SIZE定义值的3%时,生成严重警报
    当整个FRA被完全填满时,系统不可用,直接给你ORA-19815,ORA-19809 :limit exceeded for recovery files
    注FRA空间被填满,不表示当前的磁盘挂载点空间不够。
   
  FRA空间不够用或出现严重告警的情形,应考虑从以下方面着手解决
    如果仅仅是参数DB_RECOVERY_FILE_DEST_SIZE大小限制,磁盘空闲空间很多,,则直接修改该参数到一个更大的值
    如果磁盘空闲空间不多,应考虑分配更多的磁盘空间给文件系统,然后再修改DB_RECOVERY_FILE_DEST_SIZE参数到一个更大的值
    如果无法分配额外的磁盘空间,可以考虑迁移FRA到有较多可用空间的另外一个文件系统
    可以使用backup recovery area命令将整个FRA内容移动到另外的位置
    删除FRA中较早备份集或归档日志,建议使用RMAN命令来删除,若直接从os删除,Oracle认为FRA的空间并没有释放(需要crosscheck再delete)
  --Author : Leshami
  --Blog  :

更多详情见请继续阅读下一页的精彩内容:

 

相关阅读:

Oracle 11g flashback Data Archive(闪回数据归档)

Oracle flashback闪回机制

flashback table快速恢复误删除的数据

Oracle 备份恢复:flashback闪回

[Oracle]闪回flashback功能的使用

linux

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

When might a full table scan be faster than using an index in MySQL? When might a full table scan be faster than using an index in MySQL? Apr 09, 2025 am 12:05 AM

Full table scanning may be faster in MySQL than using indexes. Specific cases include: 1) the data volume is small; 2) when the query returns a large amount of data; 3) when the index column is not highly selective; 4) when the complex query. By analyzing query plans, optimizing indexes, avoiding over-index and regularly maintaining tables, you can make the best choices in practical applications.

Can I install mysql on Windows 7 Can I install mysql on Windows 7 Apr 08, 2025 pm 03:21 PM

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

MySQL: Simple Concepts for Easy Learning MySQL: Simple Concepts for Easy Learning Apr 10, 2025 am 09:29 AM

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

Can mysql and mariadb coexist Can mysql and mariadb coexist Apr 08, 2025 pm 02:27 PM

MySQL and MariaDB can coexist, but need to be configured with caution. The key is to allocate different port numbers and data directories to each database, and adjust parameters such as memory allocation and cache size. Connection pooling, application configuration, and version differences also need to be considered and need to be carefully tested and planned to avoid pitfalls. Running two databases simultaneously can cause performance problems in situations where resources are limited.

The relationship between mysql user and database The relationship between mysql user and database Apr 08, 2025 pm 07:15 PM

In MySQL database, the relationship between the user and the database is defined by permissions and tables. The user has a username and password to access the database. Permissions are granted through the GRANT command, while the table is created by the CREATE TABLE command. To establish a relationship between a user and a database, you need to create a database, create a user, and then grant permissions.

RDS MySQL integration with Redshift zero ETL RDS MySQL integration with Redshift zero ETL Apr 08, 2025 pm 07:06 PM

Data Integration Simplification: AmazonRDSMySQL and Redshift's zero ETL integration Efficient data integration is at the heart of a data-driven organization. Traditional ETL (extract, convert, load) processes are complex and time-consuming, especially when integrating databases (such as AmazonRDSMySQL) with data warehouses (such as Redshift). However, AWS provides zero ETL integration solutions that have completely changed this situation, providing a simplified, near-real-time solution for data migration from RDSMySQL to Redshift. This article will dive into RDSMySQL zero ETL integration with Redshift, explaining how it works and the advantages it brings to data engineers and developers.

Laravel Eloquent ORM in Bangla partial model search) Laravel Eloquent ORM in Bangla partial model search) Apr 08, 2025 pm 02:06 PM

LaravelEloquent Model Retrieval: Easily obtaining database data EloquentORM provides a concise and easy-to-understand way to operate the database. This article will introduce various Eloquent model search techniques in detail to help you obtain data from the database efficiently. 1. Get all records. Use the all() method to get all records in the database table: useApp\Models\Post;$posts=Post::all(); This will return a collection. You can access data using foreach loop or other collection methods: foreach($postsas$post){echo$post->

MySQL: The Ease of Data Management for Beginners MySQL: The Ease of Data Management for Beginners Apr 09, 2025 am 12:07 AM

MySQL is suitable for beginners because it is simple to install, powerful and easy to manage data. 1. Simple installation and configuration, suitable for a variety of operating systems. 2. Support basic operations such as creating databases and tables, inserting, querying, updating and deleting data. 3. Provide advanced functions such as JOIN operations and subqueries. 4. Performance can be improved through indexing, query optimization and table partitioning. 5. Support backup, recovery and security measures to ensure data security and consistency.

See all articles