Flashback on RAC
Check status
select FLASHBACK_ON, LOG_MODE from v$database;
FLASHBACK_ON LOG_MODE
------------------ ------------
NO NOARCHIVELOG
Create restore point
CREATE RESTORE POINT before_app_upg GUARANTEE FLASHBACK DATABASE;
Created.
Check restore point
select NAME,SCN, TIME, DATABASE_INCARNATION#,GUARANTEE_FLASHBACK_DATABASE, STORAGE_SIZE FROM GV$RESTORE_POINT;
check logfiles under flash_recovery_area
show parameter db_recovery
[oracle@orac1 ~]$ export PATH=/u01/app/11.2.0/grid/bin:$PATH;
[oracle@orac1 ~]$ export ORACLE_HOME=/u01/app/11.2.0/grid
[oracle@orac1 ~]$ export ORACLE_SID=+ASM1
[oracle@orac1 ~]$ asmcmd
ASMCMD> cd DATA/RAC/FLASHBACK
ASMCMD> ls
log_1.317.772113565
log_2.318.772113845
ASMCMD> ls -l
Type Redund Striped Time Sys Name
FLASHBACK UNPROT COARSE JAN 09 12:00:00 Y log_1.317.772113565
FLASHBACK UNPROT COARSE JAN 09 12:00:00 Y log_2.318.772113845
ASMCMD>
Test Flashback
srvctl stop database -d RAC
[oracle@orac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jan 9 13:03:00 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 418484224 bytes
Fixed Size 1336932 bytes
Variable Size 369101212 bytes
Database Buffers 41943040 bytes
Redo Buffers 6103040 bytes
Database mounted.
SQL> flashback database to restore point before_app_upg;
alter database open resetlogs;
Drop Restore Point
drop restore point before_app_upg;
Shutdown and start both instances
shutdown immediate;
srvctl start database -d RAC
Check status
select FLASHBACK_ON, LOG_MODE from v$database;
FLASHBACK_ON LOG_MODE
------------------ ------------
NO NOARCHIVELOG
CREATE RESTORE POINT before_app_upg GUARANTEE FLASHBACK DATABASE;
Created.
Check restore point
select NAME,SCN, TIME, DATABASE_INCARNATION#,GUARANTEE_FLASHBACK_DATABASE, STORAGE_SIZE FROM GV$RESTORE_POINT;
check logfiles under flash_recovery_area
show parameter db_recovery
[oracle@orac1 ~]$ export PATH=/u01/app/11.2.0/grid/bin:$PATH;
[oracle@orac1 ~]$ export ORACLE_HOME=/u01/app/11.2.0/grid
[oracle@orac1 ~]$ export ORACLE_SID=+ASM1
[oracle@orac1 ~]$ asmcmd
ASMCMD> cd DATA/RAC/FLASHBACK
ASMCMD> ls
log_1.317.772113565
log_2.318.772113845
ASMCMD> ls -l
Type Redund Striped Time Sys Name
FLASHBACK UNPROT COARSE JAN 09 12:00:00 Y log_1.317.772113565
FLASHBACK UNPROT COARSE JAN 09 12:00:00 Y log_2.318.772113845
ASMCMD>
Test Flashback
srvctl stop database -d RAC
[oracle@orac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jan 9 13:03:00 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 418484224 bytes
Fixed Size 1336932 bytes
Variable Size 369101212 bytes
Database Buffers 41943040 bytes
Redo Buffers 6103040 bytes
Database mounted.
SQL> flashback database to restore point before_app_upg;
alter database open resetlogs;
Drop Restore Point
drop restore point before_app_upg;
Shutdown and start both instances
shutdown immediate;
srvctl start database -d RAC
No comments:
Post a Comment