HI,What is Flashback query in Oracle9i...?

Showing Answers 1 - 8 of 8 Answers

Flahsback is used to take your database at old state like a system restore in windows. No DDL and DML is allowed when database is in flashback condition.

user should have execute permission on dbms_flashback package

for example:

at 1030 am

from scott user : delete from emp;

commit;

at 1040 am I want all my data from emp table then ?

  declare
  cursor c1 is select * from emp;
  emp_cur emp%rowtype;
   begin
   dbms_flashback.enable_at_time(sysdate - 15/1440);
   open c1;
   dbms_flashback.disable;
   loop
  fetch c1 into emp_cur;
 exit when c1%notfound;
  insert into emp values(emp_cur.empno, emp_cur.ename, emp_cur.job,
  emp_cur.mgr,emp_cur.hiredate, emp_cur.sal, emp_cur.comm,
  emp_cur.deptno);
  end loop;

commit;
 end;
 /

select * from emp;

14 rows selected

dev

  • Oct 20th, 2006
 

Thank u Rampratap.

  Was this answer useful?  Yes

when ever  a  table  is  dropped  the  database  does  not  release  the  space  assotiated  with it the  table  is  kept  in the  recycle  bin.using  flash back  statement 
one  can get the  old  table  back.

  Was this answer useful?  Yes

g_sidhu

  • Feb 18th, 2008
 

Oracle9i introduced Flashback Query to provide a simple, powerful and completely non-disruptive mechanism for recovering from human errors. It allows users to view the state of data at a point in time in the past without requiring any structural changes to the database.

This feature allows you to run a query against the database and return results as they would have been produced at an earlier time. Flashback Query uses the same mechanisms as multiversion read consistency, so it's like getting a feature for free. Get a consistent view of your data at a previous point in time.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions