| Oracle Flashback Database Version 11.2.0.3 |
|---|
| Flashback Database Demo | |||||||||||||||
| An alternative strategy to the demo presented here is to use Recovery Manager RMAN> FLASHBACK DATABASE TO SCN = <system_change_number>; If you open the database in READ ONLY mode you can shut it down, reopen it, and flashback again. |
|||||||||||||||
| Data Dictionary Objects |
|
||||||||||||||
| Exceptions |
|
||||||||||||||
| Syntax 1: SCN | FLASHBACK [STANDBY] DATABASE [<database_name>] TO [BEFORE] SCN <system_change_number>; |
||||||||||||||
| Syntax 2: TIMESTAMP | FLASHBACK [STANDBY] DATABASE [<database_name>] TO [BEFORE] TIMESTMP <system_timestamp_value>; |
||||||||||||||
| Syntax 3: RESTORE POINT | FLASHBACK [STANDBY] DATABASE [<database_name>] TO [BEFORE] RESTORE POINT <restore_point_name>; |
||||||||||||||
| Flashback Syntax Elements | |||||||||||||||
| OFF | ALTER DATABASE FLASHBACK OFF; | ||||||||||||||
| alter database flashback off; | |||||||||||||||
| ON | ALTER DATABASE FLASHBACK ON; | ||||||||||||||
| alter database flashback on; | |||||||||||||||
| Set Retention Target | ALTER SYSTEM SET db_flashback_retention_target = <number_of_minutes>; | ||||||||||||||
| alter system set DB_FLASHBACK_RETENTION_TARGET = 2880; | |||||||||||||||
| Start flashback on a tablespace | ALTER TABLESPACE <tablespace_name> FLASHBACK ON; | ||||||||||||||
| alter tablespace example flashback on; | |||||||||||||||
| Stop flashback on a tablespace | ALTER TABLESPACE <tablespace_name> FLASHBACK OFF; | ||||||||||||||
| alter tablespace example flashback off; | |||||||||||||||
| Initialization Parameters | |||||||||||||||
| Setting the location of the flashback recovery area | db_recovery_file_dest=/app/oracle/product/flash_recovery_area | ||||||||||||||
| Setting the size of the flashback recovery area | -- 4GB db_recovery_file_dest_size=4096000000 |
||||||||||||||
| Setting the retention time for flashback files (in minutes) | -- 2 days db_flashback_retention_target=2880 |
||||||||||||||
| Demo | |||||||||||||||
| conn / as sysdba SELECT * FROM v$flash_recovery_area_usage; SELECT flashback_on, log_mode FROM v$database; set linesize 121 col name format a30 col value format a30 SELECT name, value FROM gv$parameter WHERE name LIKE '%flashback%'; shutdown immediate; startup mount exclusive; alter database archivelog; alter database flashback on; alter database open; SELECT flashback_on, log_mode FROM v$database; SELECT name, value FROM gv$parameter WHERE name LIKE '%flashback%'; -- 2 days alter system set DB_FLASHBACK_RETENTION_TARGET=1440; SELECT name, value FROM gv$parameter WHERE name LIKE '%flashback%'; SELECT estimated_flashback_size FROM gv$flashback_database_log; SELECT * FROM v$flash_recovery_area_usage; |
|||||||||||||||
|
|||||||||||||||
| -- if out of disk space ORA-16014: log 2 sequence# 4163 not archived, no available destinations ORA-00312: online log 2 thread 1: 'c:\oracle\oradata\orabase\redo02.log' -- what happens The error ora-16014 is the real clue for this problem. Once the archive destination becomes full the location also becomes invalid. Oracle does not do a recheck to see if space has been made available. -- then shutdown abort; -- clean up disk space: then startup alter system archive log all to '/oracle/flash_recovery_area/ORABASE/ARCHIVELOG'; |
|||||||||||||||
| Related Topics |
| Flashback Archive |
| Flashback Drop |
| Flashback Query |
| Flashback Table |
| Flashback Transaction Backout |
| Flashback Transaction Query |
| Flashback Version Query |
| Recycle Bin |
| Restore Points |
| This site is maintained by Dan Morgan. Last Updated: | This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2013 Daniel A. Morgan All Rights Reserved | |||||||||
|
|
||||||||||