Change based incomplete recovery [message #165047] |
Tue, 28 March 2006 03:08 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
gajini
Messages: 262 Registered: January 2006
|
Senior Member |
|
|
Hi,
I've problem with doing change based incomplete recovery,can anyone explain me how to do it.
In my database,these are all the things i did after connected as sys,
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
1 1 0 104857600 1 YES UNUSED 0
2 1 0 104857600 1 YES UNUSED 0
3 1 1 104857600 1 NO CURRENT 450829 17-MAR-06
SQL> select * from emp;
ID
9
SQL> alter system switch logfile;
System altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
1 1 2 104857600 1 NO CURRENT 472676 28-MAR-06
2 1 0 104857600 1 YES UNUSED 0
3 1 1 104857600 1 YES ACTIVE 450829 17-MAR-06
SQL>insert into emp values(10);
SQL> commit
SQL> select * from emp;
ID
----------
9
10
SQL>shutdown
Then,i restarted the database to do incomplete recovery such that the newly inserted row shouldn't be there,
SQL>startup mount
SQL> recover database until change 472676;
Media recovery complete.
SQL> alter database open resetlogs;
Database altered.
SQL> select * from emp;
ID
----------
9
10
But the newly inserted row(10) still exists.
My questions,
1) What is wrong with my way of doing change based incomplete recovery?
2) What I've to do such that newly inserted row shouldn't be there?
Please anyone help me to get out of this problem
|
|
|
Re: Change based incomplete recovery [message #165173 is a reply to message #165047] |
Tue, 28 March 2006 12:58 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
Frank Naude
Messages: 4590 Registered: April 1998
|
Senior Member |
|
|
You cannot use the "RECOVER" command to go back in time. You need to restore from backup and recover (roll forward to point-in-time).
BTW: If you are on 10g you can do a FLASHBACK DATABASE without having to restore the database first.
|
|
|