053 V10.02 1-100

1.What are the prerequisites for performing flashback transactions? (Choose all that apply)
A.Supplemental log must be enabled
B.Supplemental log must be enabled for the primary key
C.Undo retention guarantee for the database must be configured
D.EXECUTE permission on the DBMS_FLASHBACK package must be granted to the user
Oracle Flashback Query feature lets you specify a target time and then run queries against your database, viewing results as they would have appeared at that time. To recover from an unwanted change like an erroneous update to a table, a user could choose a target time before the error and run a query to retrieve the contents of the lost rows. 
行級別的恢復查詢,一般是誤更新數據,或者誤刪除部分表數據,可以讓你查詢某個時刻的表數據。
·  Oracle Flashback Version Query lets you view all the versions of all the rows that ever existed in one or more tables in a specified time interval. You can also retrieve metadata about the differing versions of the rows, including start time, end time, operation, and transaction ID of the transaction that created the version. This feature can be used both to recover lost data values and to audit changes to the tables queried. 
也屬於行級別的,不同的是可以查詢某段時間數據的變化。
·  Oracle Flashback Transaction Query lets you view changes made by a single transaction, or by all the transactions during a period of time. 
事務級別的查詢。
·  Oracle Flashback Table returns a table to its state at a previous point in time. You can restore table data while the database is online, undoing changes only to the specified table. 
表級別的閃回,使表恢復到過去某一個時刻。
·  Oracle Flashback Drop reverses the effects of a DROP TABLE statement. 
表級別的閃回,使表恢復到被刪除前的狀態。
·  Oracle Flashback Database provides a more efficient alternative to database point-in-time recovery. When you use flashback database, your current datafiles revert to their contents at a past time. The result is much like the result of a point-in-time recovery using datafile backups and redo logs, but you do not have to restore datafiles from backup and you do not have to re-apply as many individual changes in the redo logs as you would have to do in conventional media recovery.
數據庫級別的閃回,使整個數據庫恢復到過去的某一個時刻。

Flashback Table, Flashback Query, Flashback Transaction Query and Flashback Version Query all rely on undo data, undo_retention 參數決定了flashback Query所能回去的時間,Flashback Drop使用的是表空間的空間,Flashback Database依賴於歸檔日誌,所以Flashback Database必須數據庫在歸檔模式下。


Configuring Your Database for Flashback Transaction

To configure your database for the Flashback Transaction feature, you or your database administrator must:

  • With the database mounted but not open, enable ARCHIVELOG:

    ALTER DATABASE ARCHIVELOG;
    
  • Open at least one archive log:

    ALTER SYSTEM ARCHIVE LOG CURRENT;
    
  • If not done, enable minimal and primary key supplemental logging:

    ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
    ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
    
  • If you want to track foreign key dependencies, enable foreign key supplemental logging:

    ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (FOREIGN KEY) COLUMNS;
    

Note:

If you have very many foreign key constraints, enabling foreign key supplemental logging might not be worth the performance penalty.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章