Pages

Search This Blog ...

Sunday, April 3, 2016

What Is Flashback Query In Oracle 11g R2

In this tutorial i'll show you how execute Oracle Flashback Technology in Oracle 11g R2.

In Oracle there are Seven Technology as given below.
   In the Flashback Technology, It include database related group of features that manage a state of your data in the database.

   This Technology works on the undo data so you can get all those transaction, query as well as data from undo segments thus, your can recovery your data which had been lost or damage as well as you can see the query which had been perform on a specific time or SCN. 
  1. Flashback Query.
  2. Flashback Transaction.
  3. Flashback Transaction Query
  4. Flashback Version Query.
  5. Flashback Table.
  6. Flashback Database.
  7. Flashback Data Archive [ Total Recall ].
   Some few advantages given below,
  • See the query had been perform.
  • See the transaction information.
  • See the past state data.
  • You can perform rollback entire table without performing database recovery.
  • If you delete or drop the table by mistake and you perform DDL or commit without knowing the previous transaction.  and so on...
Here i'll be show you only 1st Flashback Query as below.
 This Technology provide to you perform a  Recovering lost of data by using timestamp or SCN [ System Change Number ].


  It's can also retain committed data by specific point in time by using  AS OF clause in SELECT statement.

 Here on example as given below

  In employees table in salary of employee_id  200 is 20,000 at now, that's incorrect entry so you want change value of this employee by using timestamp and data also is committed.

Flashback Query
 
You can also use SCN no in place of timestamp like,

UPDATE employees
SET salary =
    (SELECT salary FROM employees
     AS OF SCN <no> WHERE employee_id=200)
WHERE employee_id=200;

That's was a Flashback Query In Oracle 11g.

No comments:

Post a Comment

Thank you for give me feedback : )