Introduction to Oracle 11g flash back Data Archiving

Source: Internet
Author: User

The following articles mainly introduce the Oracle 11g flash back data archiving. The Oracle 11g flash back data archiving function can archive UNDO data in practice. The following describes the relevant content. I hope you will gain some benefits after browsing.

Although ORA-01555 errors can be avoided and reduced through various means, but with the passage of time, the UNDO information will always be lost, then can save the information, so that the database can be traced back within a certain period of history, so that we can see a data table segment at any historical point in time?

Starting from Oracle Database 11g, Oracle provides the following function: flash back to Data Archiving Flashback Data Archive ). With this feature, Oracle databases can archive UNDO data to provide comprehensive historical data queries. Therefore, Oracle introduces a new concept, Oracle Total Recall, that is, Oracle comprehensive Recall.

Flash back data archiving can be compared with the log archiving that we have been familiar with. The log archiving records the Historical Status of Redo, which is used to ensure the continuity of recovery. Flash back archive records the Historical Status of UNDO, it can be used to perform flash tracing query on data. The background process LGWR is used to write Redo information to the log file, and the ARCH process is responsible for archiving logs. in Oracle 11g, the new background Process FBDAFlashback Data Archiver Process is used to archive and write the flash Data:

 
 
  1. [oracle@sp3: ~]$ps -ef | grep fbda | grep -v grep  
  2. oracle 3251 1 0 Jan07 ? 00:00:11 ora_fbda_ccdb  

Flash back archive data can even be saved on a yearly basis. Oracle 11 GB can reduce space consumption through internal partitioning and compression algorithms. This feature is especially useful for environments that require auditing and historical data partitioning, however, for busy database environments, flash back data storage obviously consumes more storage space. Of course, you can flash back data archiving for some tables as needed to meet specific business needs.

Because flash back data archiving requires independent storage, you must create an independent ASSM automatic segment space management before using this feature.) tablespace:

 
 
  1. sys@TQGZS11G> create tablespace fbda datafile 
    '/oracle/oradata/tqgzs11g/FBDA.dbf' size 200M
     segment space management auto;  
  2. Tablespace created.  

Then, you can create a FLASHBACK data ARCHIVE area based on the tablespace. The flashback archive administer system permission is required to create a FLASHBACK data ARCHIVE, which is performed by the SYS user here:

 
 

  1. sys@TQGZS11G> create flashback archive fda tablespace fbda retention 1 month;  
  2. Flashback archive created.  

This archive area can be used to record the data volume of the data table. To facilitate testing, change the UNDO tablespace to a smaller one so that the UNDO data can be aged as soon as possible:

 
 
  1. sys@TQGZS11G> create undo tablespace UNDOTBS2_SMALL datafile '/oracle/oradata/tqgzs11g/UNDOTBS2_SMALL.dbf' size 20M autoextend off;  
  2. Tablespace created.  
  3. sys@TQGZS11G> alter system set undo_tablespace= UNDOTBS2_SMALL;  
  4. System altered.  
  5. sys@TQGZS11G> show parameter undo  
  6. NAME TYPE VALUE  
  7. undo_management string AUTO  
  8. undo_retention integer 900  
  9. undo_tablespace string UNDOTBS2_SMALL  

Next, use the test user connection to perform the flash back ARCHIVE setting for the test table. The flashback archive object permission is required to enable the historical data tracing:

 
 
  1. sys@TQGZS11G> conn tq/tq  
  2. Connected.  
  3. tq@TQGZS11G> select TABLE_NAME from user_tables;  
  4. TABLE_NAME  
  5. T  
  6. EMP  
  7. tq@TQGZS11G> alter table t flashback archive fda;  
  8. Table altered.  

To cancel the flash archive of a data table, run the following command:

 
 
  1. alter table table_name no flashback archive; 

The above content is the description of Oracle 11g flash back data archiving, hope to bring you some help in this regard.

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.