Flashback Data Archiving experiment-oracletotalrecall

Source: Internet
Author: User
New features provided by ORACLE11G. With this feature, ORACLE archives UNDO data to provide comprehensive historical data query. Similar to archiving logs, a new background process is added at 11 GB.

New features provided by ORACLE 11G. With this feature, ORACLE archives UNDO data to provide comprehensive historical data query. Similar to archiving logs, a new background process is added at 11 GB.

Flash back data archiving: Oracle total recall ORACLE comprehensive recall function.

New features provided by ORACLE 11G.
With this feature, ORACLE archives UNDO data to provide comprehensive historical data query.
Similar to archiving logs, the new background process FBDA (flashback data archiver process) is used to archive and write the flash data.
ORACLE can specify the storage time of flash back archive data, and reduce space usage through internal partitioning and compression algorithms.
Flash back data archiving requires independent storage. before using this feature, you need to create an independent ASSM tablespace.
DDL cannot be used on the table tracked by FBDA (add column, rename, and grant ).

Start the experiment:

1. Create the tablespace required by the FBDA process-flash back data archive-flash back data Archiving

21:44:32 SQL> create tablespace bys_flashback datafile '/u01/app/oracle/oradata/bys001/bys_flashback.dbf' size 10 m autoextend off;
Tablespace created.
21:45:35 SQL> show user
USER is "SYS"
The Default FBDA can be created only after you log on to sysdba, and only one Default FBDA can be created.
21:45:39 SQL> create flashback archive default fbda1 tablespace bys_flashback retention 7 day;
Flashback archive created.
21:46:36 SQL> create flashback archive fbda2 tablespace bys_flashback quota 7 m retention 10 day;
Flashback archive created.

2. Create a table and specify the flash back archive attribute to record the SCN before and after DML operations

21:47:52 SQL> conn bys/bys

Connected.
21:49:54 SQL> create table test6 (abc varchar2 (9) flashback archive;
Table created.
What is the name of the created flashback archive table?
Alter table test6 no flashback archive;
Insert data. The demo is omitted.
21:51:27 SQL> select * from test6;
ABC
---------
1
2
3
21:51:32 SQL> select current_scn from v $ database;
CURRENT_SCN
-----------
1372223
21:51:44 SQL> delete from test6 where abc = 3;
1 row deleted.
21:52:12 SQL> commit;
Commit complete.
21:52:14 SQL> host the ALERT Log here is a soft link from the source ALERT Log under the TRACE directory to facilitate viewing the log.
Aa. t back1.sh Desktop
Alert_bys001.log back2-20130623-1144.log fullback. sh
Archback. sh back2.sh rmanlog
Back0.sh cumulative

3. view the creation of the flash archive tablespace and the startup of the FBDA process from the alert Log

[Oracle @ oel-01 ~] $ Tail alert_bys001.log
SUPLOG: unique = OFF, foreign key = OFF, all column = OFF
SUPLOG: procedural replication = OFF
Completed: alter database add supplemental log data
Sun Jun 23 21:45:33 2013
Create tablespace bys_flashback datafile '/u01/app/oracle/oradata/bys001/bys_flashback.dbf' size 10 m autoextend off
Completed: create tablespace bys_flashback datafile '/u01/app/oracle/oradata/bys001/bys_flashback.dbf' size 10 m autoextend off
Sun Jun 23 21:46:36 2013
Starting background process FBDA
Sun Jun 23 21:46:36 2013
FBDA started with pid = 33, OS id = 3961
[Oracle @ oel-01 ~] $ Exit
Exit

21:54:08 SQL> show parameter undo
NAME TYPE VALUE
-----------------------------------------------------------------------------
Undo_management string AUTO
Undo_retention integer 900
Undo_tablespace string UNDOTBS1
21:56:08 SQL> col name for a40
21:56:20 SQL> select file #, name from v $ datafile where name like '% test % ';
FILE # NAME
--------------------------------------------------
7/u01/app/oracle/oradata/bys001/test1_undo.dbf

This sentence is not used:
Drop tablespace undotbs1 including contents and datafiles;

Related reading:

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

Oracle flashback flash back Mechanism

Flashback table quick recovery of accidentally deleted data

Oracle backup recovery: flashback flash back

[Oracle] use of the flashback Function

For more details of this article, please continue to read the highlights of page 2nd:

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.