Guarantee Restore Point Of Flashback

Guarantee Restore Point Of Flashback
two kind of restore point : no guarantee,
                            guarantee.
1)restore point no guarantee flashback database
1@@@@prepare
SQL> create table fb_rp(a number);
Table created.
SQL> create restore point fb_rp1;
Restore point created.
SQL> select GUARANTEE_FLASHBACK_DATABASE,SCN,TIME from v$restore_point;
GUA        SCN               TIME
----------------------------
NO        764610            28-NOV-11 02.55.10.000000000 AM
SQL> truncate table fb_rp;
Table truncated.
 
2@@@@begin
[oracle@station3 orcl]$ rman target /
RMAN> flashback database to restore point fb_rp1;
SQL> alter database open resetlogs; 
Database altered.
SQL> desc fb_rp 
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 A                                                  NUMBER
 
3@@@@check flashback database to before resetlogs.
RMAN> list incarnation of database; 
List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       ORCL     1289234111       PARENT  1          2005-06-30 19:09:40
2       2       ORCL     1289234111       PARENT  446075     2011-09-10 02:49:38
3       3       ORCL     1289234111       PARENT  752156     2011-11-23 15:32:24
4       4       ORCL     1289234111       PARENT  757257     2011-11-28 01:38:18
5       5       ORCL     1289234111       PARENT  763286     2011-11-28 02:33:50
6       6       ORCL     1289234111       PARENT  763745     2011-11-28 02:51:04
7       7       ORCL     1289234111       CURRENT 765419     2011-11-28 03:04:27
 
SQL> shutdown immediate ;
SQL> startup mount;
[oracle@station3 orcl]$ rman target /
RMAN> flashback database to before resetlogs;
RMAN> list incarnation of database; 
List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       ORCL     1289234111       PARENT  1          2005-06-30 19:09:40
2       2       ORCL     1289234111       PARENT  446075     2011-09-10 02:49:38
3       3       ORCL     1289234111       PARENT  752156     2011-11-23 15:32:24
4       4       ORCL     1289234111       PARENT  757257     2011-11-28 01:38:18
5       5       ORCL     1289234111       PARENT  763286     2011-11-28 02:33:50
6       6       ORCL     1289234111       PARENT  763745     2011-11-28 02:51:04
7       7       ORCL     1289234111       CURRENT 765419     2011-11-28 03:04:27
 
 
2)restore point guarantee flashback database
1@@@@prepare
SQL> select BEGIN_TIME,END_TIME,ESTIMATED_FLASHBACK_SIZE 
from v$flashback_database_stat;
BEGIN_TIME          END_TIME            ESTIMATED_FLASHBACK_SIZE
------------------- ------------------- ------------------------
2011-11-28 03:09:09 2011-11-28 03:14:44                        0
@@@
SQL> create table g_rsp1(a number);
Table created.
@@@
SQL> create restore point g_rsp1 guarantee flashback database; 
Restore point created.
@@@check the point.
SQL> select NAME,GUARANTEE_FLASHBACK_DATABASE from v$restore_point where GUARANTEE_FLASHBACK_DATABASE='YES';
NAME            GUA
--------------- ---
G_RSP1          YES
 
2@@@@begin
@@@the guarantee point would assure flashback to that time point.
@@@even if you set flashback off,it would work the same.
SQL> alter database flashback off;
Database altered.
SQL> shutdown immediate
SQL> startup mount
@@@
[oracle@station3 orcl]$ rman target / 
RMAN> flashback database to restore point g_rsp1;
RMAN> alter database open resetlogs;
database opened
@@@
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
RESTORE POINT ONLY

你可能感兴趣的:(restore,flashback,point,guarantee)