|
|
|
Re: data recovery [message #215242 is a reply to message #215235] |
Sat, 20 January 2007 01:57 |
amit_vass2000
Messages: 52 Registered: December 2006 Location: Delhi
|
Member |
|
|
if someone have issued a command
delete from emp where hiredate between '1-jul-92' and '31-jul-92'
20 rows deleted
commit;
NOW IS THERE ANY COMMAND BY WHICH THIS DATA COULD BE RECOVERED.
THANX IN ADVANCE
|
|
|
how lost data recovered [message #215250 is a reply to message #215235] |
Sat, 20 January 2007 02:53 |
amit_vass2000
Messages: 52 Registered: December 2006 Location: Delhi
|
Member |
|
|
if someone have issued a query
delete from emp where hiredate between '1-jul-92' and '31-jul-92'
20 rows deleted
commit;
NOW IS THERE ANY COMMAND BY WHICH THIS DATA COULD BE RECOVERED.
THANX IN ADVANCE
|
|
|
|
|
Re: how lost data recovered [message #215284 is a reply to message #215256] |
Sat, 20 January 2007 08:51 |
Mohammad Taj
Messages: 2412 Registered: September 2006 Location: Dubai, UAE
|
Senior Member |
|
|
Hi,
you are not mention your oracle Version. if 10g. then you can use 'FLASHBACK' option.
Flashback Query
you must choose an undo retention interval that is long enough to enable users to construct a snapshot of the database for the oldest version of the database that they are interested in.
SQL> conn sys as sysdba
Enter password:
Connected.
SQL> alter system set undo_retention = 3600;
System altered.
SQL> conn hr/hr
Connected.
SQL> alter session set nls_date_format = 'hh24:mi:ss';
Session altered.
SQL> select sysdate from dual;
SYSDATE
--------
19:04:49
SQL> create table hrtest ( no number, name varchar2(20));
Table created.
SQL> begin
2 insert into hrtest values ( 1, 'aaa');
3 insert into hrtest values ( 2, 'bbb');
4 insert into hrtest values ( 3, 'ccc');
5 end;
6 /
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.
SQL> select sysdate from dual;
SYSDATE
--------
19:06:23
SQL> delete from hrtest where name = 'ccc';
1 row deleted.
SQL> commit;
Commit complete.
SQL> select * from hrtest;
NO NAME
---------- --------------------
1 aaa
2 bbb
SQL> edWrote file afiedt.buf
1 select * from hrtest AS OF TIMESTAMP 2 to_timestamp ('2006-11-16 19:06:23','YYYY-MM-DD HH24:MI:SS')
3* where name = 'ccc'
4 /
NO NAME
---------- --------------------
3 ccc
SQL> insert into hrtest 2 ( select * from hrtest AS OF TIMESTAMP 3 to_timestamp ('2006-11-16 19:06:23','YYYY-MM-DD HH24:MI:SS')
4 where name = 'ccc');
1 row created.
SQL> select * from hrtest;
NO NAME
---------- --------------------
1 aaa
2 bbb
3 ccc
http://dbataj.blogspot.com/2006/11/flashback-oracle10gr1-101020.html
regards
Taj
[Updated on: Sat, 20 January 2007 08:55] Report message to a moderator
|
|
|
|
|
|