Thursday, December 31, 2015

FlashBack on RAC


Check status 

select FLASHBACK_ON, LOG_MODE from v$database;  


Create restore point

CREATE RESTORE POINT before_app_upg GUARANTEE FLASHBACK DATABASE;

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


  1. [oracle@orac1 ~]$ export PATH=/u01/app/11.2.0/grid/bin:$PATH;  
  2. [oracle@orac1 ~]$ export ORACLE_HOME=/u01/app/11.2.0/grid  
  3. [oracle@orac1 ~]$ export ORACLE_SID=+ASM1  
  4. [oracle@orac1 ~]$ asmcmd  
  5. ASMCMD> cd DATA/RAC/FLASHBACK  
  6. ASMCMD> ls  
  7. log_1.317.772113565  
  8. log_2.318.772113845  
  9. ASMCMD> ls -l  
  10. Type       Redund  Striped  Time             Sys  Name  
  11. FLASHBACK  UNPROT  COARSE   JAN 09 12:00:00  Y    log_1.317.772113565  
  12. FLASHBACK  UNPROT  COARSE   JAN 09 12:00:00  Y    log_2.318.772113845  
  13. 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