RAC flashback Database Configuration

Source: Internet
Author: User

Oracle Flashback
In 10 Gb, flashback includes: flashback database (database level), flashback table (table level), flashback drop (Table level), and flashback VERSION Query (record level ), flashback transaction query (record-level ).
Record-level and table-level flashback operations can be used by common users without DBA intervention. Database-level flashback must be performed by DBA.

The entire flashback database architecture includes a recover writer (rvwr) background process, flashback database log and flash recovery area. The ability to roll back the entire database to the status at a certain time point in the past, depending on the flashback log, these logs include the pre-image of the data block, so it is faster than RMAN. However, the flashback database has some limitations.

Flashback drop is used to restore objects accidentally deleted by users. Dependent on tablespace Recycle Bin (tablespace recycle bin ).

The flashback table is actually in the Data flash back operation. The following three operations are only used for analysis. The actual operation uses the flashback table. Depends on undo.

9 iflashback query can query the object status at a certain time point in the past. Depends on undo.

The flashback version query can be used to view how a record changes over a certain period of time, that is, the history of record evolution. Based on these history, you can quickly determine when an error occurred and then restore it to the previous state. Depends on undo.

Flashback transaction query allows you to view all changes in the execution of a transaction. You need to access the flashback_transaction_query view. Depends on undo.

Enable flashback Database
Flashback database is mainly set and managed through three initialization parameters.
Db_recovery_file_dest: Specifies the position of the flash recovery zone. If you use ASM, you can only specify the disk group, but not the directory.
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. The unit is minute. The default value is 1440 minutes, that is, one day. Of course, the rollback time is also determined by 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.

Configuration example:

-- Execute SQL> alter system set db_recovery_file_dest_size = 100 m scope = spfile SID = '*'; System altered. SQL> alter system set db_recovery_file_dest = '+ recovery' scope = spfile SID = '*'; System altered. SQL> Col name format A32 heading 'parameter 'SQL> Col value format A32 heading 'setting' SQL> select name, value from V $ parameter where name like '% flash %' or name like '% recovery %' order by name; parameter setting- Export mongodb_flashback_retention_target 2017104857600recovery_parallelism 0 -- disable all nodes SQL> shutdown immediate -- run on a node, start to mount, enable Flash back SQL> startup Mount Oracle instance started. total system global area 264241152 bytesfixed size 2020056 bytesvariable size 113249576 bytesdatabase buffers 146800640 byte Sredo buffers 2170880 bytesdatabase mounted. SQL> alter database flashback on; database altered. SQL> Col name format a12sql> Col current_scn format 9999999sql> Col flashback_on format a20sql> select name, current_scn, flashback_on 2 from V $ database; parameter current_scn flashback_on ------------ ----------- -------------------- orarac 0 yessql> alter database open; database altered. SQL> Col name format 32 heading 'parameter 'SQL> Col value format A32 heading 'setting' SQL> select name, value from V $ parameter where name like '% flash %' or name like '% reeter %' order by name; parameter setting limit 1440db_recovery_file_dest + limit 104857600recovery_parallelism 0 -- start other nodes, check whether SQL> S is set successfully. Elect name, current_scn, flashback_on from V $ database; name current_scn flashback_on --------- ----------- export orarac 956458 yes -- view the flashback log asmcmd> pwd + recovery/orarac/logs> ls-ltrtype redund striped time sys nameflashback mirror fine 11? 06 10:00:00 y log_1.256.766492023flashback mirror fine 11? 06 10:00:00 y log_2.257.76621393

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.