Home Database Mysql Tutorial Oracle 10g学习之闪回数据库

Oracle 10g学习之闪回数据库

Jun 07, 2016 pm 04:55 PM
oracle database

estimated_flashback_size -------估计数据的大小 Fromv$flashback_database_log; V$FLASHBACK_DATABASE_STAT 显示闪回

  目标

  闪回数据库

  去定为每种恢复情形使用哪种闪回技术

  配置和使用闪回数据库

  监视闪回数据库

  使用EM管理闪回数据库

  管理(维护)Flash Recovery Area

  闪回技术概述

  9i中首次引入闪回技术,第一个出现的是闪回查询(flackback query)。

  10g里有了显着的扩展:

  闪回数据库(Flashback Database)

  闪回删除(Flashbackup Drop)

  闪回版本查询(Flashback Versions Query)

  闪回事务查询(Flashback Transaction Query)

  闪回表(FlashbackTable)

  所有的闪回技术,除了闪回数据库,都是基于撤销数据(undodata)。

  闪回数据库技术可以替代不完全恢复,优势在于闪回数据库更快效率更高,它是基于闪回日志的。

  闪回删除、闪回版本查询、闪回事务和闪回表最佳用法是恢复单独的对象或者对象中的行。

  闪回删除------------虚拟回收站,允许被删除的对象重建

  闪回版本查询、闪回事务查询--------------识别和确定需要恢复到先前状态的数据行

  闪回表---------------从错误中恢复单独的表或表组

  闪回数据库最适用于从某些种类的失误中恢复,如截短大表、不完整的批任务或删除了用户。

  闪回数据库概述

  闪回数据库能使整个数据库闪回到特定的时间点。

  闪回数据库恢复比传统恢复操作更快的原因是:恢复不再受数据库大小的影响。

  闪回数据库恢复时间正比于恢复过程汇总需要备份的变化的数量,而不是数据文件和归档日志大小。

  闪回数据库恢复的结构:恢复写入器(PVWR)后台进程和闪回数据库日志组成。

  PVWR在闪回控制区写入闪回数据库日志。

  闪回恢复区。

  闪回数据库的局限:

  1.不能解决介质故障,介质故障仍然需要重建数据文件和恢复归档日志。

  2.缩小数据文件到较小的尺寸,也被称为截短数据文件,,闪回数据库不能撤销。

  3.如果控制文件被重建,不能使用闪回数据库

  4.不能完成删除一个表空间并用resetlogs恢复。

  5.不能将数据库闪回到一个SCN值(如果该SCN早于闪回日志中最早的可用的SCN)

  使用Recovery Manager管理闪回恢复区

  闪回恢复区专门用于将所有恢复文件集中存储于磁盘上的某个区域。

  闪回恢复区对恢复过程提供两个主要好处:

  所有恢复文件集中存储在一个区域

  它提供更快的备份和重建方法,因为信息被写入磁盘而不是磁带

  闪回恢复区通过初始化数据库参数而建立,同时也在参数中定义恢复区大小和位置。

  BDA_OUTSTANDING_ALERTS视图可查看闪回恢复区状态信息。

  恢复区使用率达到90%和95%时,10g数据库将向警告日志发送警告信息。90%时10g将自动把已废弃的 文件从闪回恢复区删除。

  配置闪回恢复区

  只需在数据库增加一对数据库参数:db_recovery_file_dest_size db_recovery_file_dest

  例子:

  1.SQL>altersystemsetdb_recovery_file_dest_size=10mscope=both

  2.SQL>altersystemsetdb_recovery_file_dest='d:Oracleflash_recovery_areatest';

  修改用alter system

  停用闪回恢复区:alter system set db_recovery_file_dest=' ';

  使用闪回恢复区

  闪回恢复区是一个集中的恢复区域。

  这些文件和数据文件及控制文件有关系。这就减少了手工清除不需要的归档日志。

  V$recovery_file_dest检查消耗的空间和其他关于闪回恢复区的统计信息。

  闪回恢复区可以包括数据文件、控制文件、联机重做日志、各种各样的RMAN文件和闪回日志。用户可以在建立重做日志、控制文件、和归档日志文件时将他们存储在闪回恢复区。

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)

MySQL: An Introduction to the World's Most Popular Database MySQL: An Introduction to the World's Most Popular Database Apr 12, 2025 am 12:18 AM

MySQL is an open source relational database management system, mainly used to store and retrieve data quickly and reliably. Its working principle includes client requests, query resolution, execution of queries and return results. Examples of usage include creating tables, inserting and querying data, and advanced features such as JOIN operations. Common errors involve SQL syntax, data types, and permissions, and optimization suggestions include the use of indexes, optimized queries, and partitioning of tables.

What to do if the oracle can't be opened What to do if the oracle can't be opened Apr 11, 2025 pm 10:06 PM

Solutions to Oracle cannot be opened include: 1. Start the database service; 2. Start the listener; 3. Check port conflicts; 4. Set environment variables correctly; 5. Make sure the firewall or antivirus software does not block the connection; 6. Check whether the server is closed; 7. Use RMAN to recover corrupt files; 8. Check whether the TNS service name is correct; 9. Check network connection; 10. Reinstall Oracle software.

Why Use MySQL? Benefits and Advantages Why Use MySQL? Benefits and Advantages Apr 12, 2025 am 12:17 AM

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.

How to solve the problem of closing oracle cursor How to solve the problem of closing oracle cursor Apr 11, 2025 pm 10:18 PM

The method to solve the Oracle cursor closure problem includes: explicitly closing the cursor using the CLOSE statement. Declare the cursor in the FOR UPDATE clause so that it automatically closes after the scope is ended. Declare the cursor in the USING clause so that it automatically closes when the associated PL/SQL variable is closed. Use exception handling to ensure that the cursor is closed in any exception situation. Use the connection pool to automatically close the cursor. Disable automatic submission and delay cursor closing.

How to create cursors in oracle loop How to create cursors in oracle loop Apr 12, 2025 am 06:18 AM

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.

How to stop oracle database How to stop oracle database Apr 12, 2025 am 06:12 AM

To stop an Oracle database, perform the following steps: 1. Connect to the database; 2. Shutdown immediately; 3. Shutdown abort completely.

What steps are required to configure CentOS in HDFS What steps are required to configure CentOS in HDFS Apr 14, 2025 pm 06:42 PM

Building a Hadoop Distributed File System (HDFS) on a CentOS system requires multiple steps. This article provides a brief configuration guide. 1. Prepare to install JDK in the early stage: Install JavaDevelopmentKit (JDK) on all nodes, and the version must be compatible with Hadoop. The installation package can be downloaded from the Oracle official website. Environment variable configuration: Edit /etc/profile file, set Java and Hadoop environment variables, so that the system can find the installation path of JDK and Hadoop. 2. Security configuration: SSH password-free login to generate SSH key: Use the ssh-keygen command on each node

How to create oracle dynamic sql How to create oracle dynamic sql Apr 12, 2025 am 06:06 AM

SQL statements can be created and executed based on runtime input by using Oracle's dynamic SQL. The steps include: preparing an empty string variable to store dynamically generated SQL statements. Use the EXECUTE IMMEDIATE or PREPARE statement to compile and execute dynamic SQL statements. Use bind variable to pass user input or other dynamic values ​​to dynamic SQL. Use EXECUTE IMMEDIATE or EXECUTE to execute dynamic SQL statements.

See all articles