Six flashback technologies in Oracle, flashback

Source: Internet
Author: User

Six flashback technologies in Oracle, flashback

The Flashback technology is based on the content in the Undo segment, so it is limited by the UNDO_RETENTON parameter.
To use the flashback feature, you must enable automatic undo tablespace management.
Another new feature in Oracle 11g: Oracle Flashback Data Archive.
The FDA separately stores changed data in the created Flashback Archive to distinguish it from undo,
In this way, you can set a separate storage policy for the flash back archive area, so that you can flash back to the old data before the specified time without affecting the undo policy.

In Oracle 10 Gb, the Flash back family is divided into the following members:
Flashback Database,
Flashback Drop,
Flashback Query (Flashback Query, Flashback Version Query,
Flashback Transaction Query)
And Flashback Table.

New Feature of flashback in Oracle 11g: flashback Archiving

 

 

Oracle 11g Flashback Data Archive (flash back Data archiving)

Oracle Flashback flash back Mechanism

Oracle Flashback database

Flashback table quick recovery of accidentally deleted data

Oracle backup recovery: Flashback flash back

1. Flashback Recovery Area)
Introduce the flashback query in oracle 9i to check the consistent data at a certain time point in the past as needed,
The undo tablespace storage information is used to flash back to query previous versions. Of course, this is limited by the size of the undo tablespace,
And retention policy. If undo is overwritten, the query cannot be performed.

Oracle10g enhances the flash-back query function and provides the ability to roll back the entire database to a time point in the past,
This is implemented by introducing a new flashback log. Flashback log is a bit similar to redo log,
However, the redo log rolls the database forward, and the flashback log rolls the database back.
To save files related to management and Backup recovery, oracle10g provides a Flashback recovery area ),
This region is created in the oracle_base directory by default. You can restore all relevant files,
For example, flashback log, archive log, and backup set are stored in this region for centralized management.

1.1 set the flash recovery zone
The Flash recovery zone is mainly set and managed through three initialization parameters:
Db_recovery_file_dest: Specifies the position of the flash recovery zone.
Db_recovery_file_dest_size: Specifies the available space size of the flash recovery zone.
Db_flashback_retention_target: specifies the time when the database can be rolled back, in minutes,
The default value is 1440 minutes, that is, one day. Of course, the actual rollback time depends on the size of the flash recovery zone,
Because the flash log required for rollback is saved.
Therefore, this parameter must be modified with db_recovery_file_dest_size.

 
SQL> ALTER SYSTEM SET db_recovery_file_dest_size = 3g SCOPE = BOTH;

System altered.

SQL> ALTER SYSTEM SET db_recovery_file_dest = 'd:/app/Administrator/flash_recovery_area 'SCOPE = BOTH;

System altered.

SQL> show parameter db_recovery_file_dest

NAME TYPE VALUE
--------------------------------------------------------------------
Db_recovery_file_dest string D:/app/Administrator/flash_recovery_area
Db_recovery_file_dest_size large integer 3852 M
SQL> show parameter db_flashback

NAME TYPE VALUE
------------------------------------------------------------------
Db_flashback_retention_target integer 1440

We can see that db_flashback_retention_target is 1440 minutes by default, that is, 24 hours,
It should be noted that although this parameter does not directly specify the flash recovery area size, it is restricted by this parameter,
For example, if the database has about 10% data changes every day, if the value of this initialization parameter is set to 1440,
The size of the flash recovery area should be at least 10% of the actual capacity of the current database,
If this initialization parameter is set to 2880, the size of the flash recovery area is at least 20% of the database capacity.

 

Modify this parameter:

SQL> alter system set db_flashback_retention_target = 2880 scope = both;

 

1.2 cancel flashing back to recovery zone
Set db_recovery_file_dest to null to disable the flash recovery zone.
If flashback database is enabled, you cannot cancel flashing back to the recovery zone.

SQL> alter system set db_recovery_file_dest = '';

Alter system set db_recovery_file_dest =''

*

Row 3 has an error:
ORA-02097: The parameter cannot be modified because the specified value is invalid
ORA-38775: Unable to disable recovery zone-Flashback database enabled
SQL> shutdown immediate

The database has been closed.

The database has been detached.

The ORACLE routine has been disabled.

SQL> startup mount;

The ORACLE routine has been started.
Total System Global Area 849530880 bytes
Fixed Size 1377896 bytes
Variable Size 637536664 bytes
Database Buffers 205520896 bytes
Redo Buffers 5095424 bytes
The database has been loaded.

SQL> alter database flashback off;

The database has been changed.

SQL> alter database open;

The database has been changed.

SQL> alter system set db_recovery_file_dest = '';

The system has been changed.

SQL> show parameter db_recovery_file_dest

NAME TYPE VALUE
-----------------------------------------------------------------------------
Db_recovery_file_dest string
Db_recovery_file_dest_size large integer 3852 M

SQL>


Note:
(1) DB_RECOVERY_FILE_DEST_SIZE can be cleared only after DB_RECOVERY_FILE_DEST is cleared.
(2) The initialization parameter db_recovery_file_dest_size is set with a little attention:
The size of the file's 0th blocks and the size of the operating system's data block header is not included. This parameter does not represent the actual space occupied.
If the space is compressed, mirrored, or RAID, the value of this parameter is different.

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.