Home  Easy-Code   Forum    Updater 


Not signed in (Sign In)
    • CommentAuthorbrother2
    • CommentTimeApr 4th 2012
     
    Enable flashback for a quick recover,
    1. Set the db in archive mode in init.ora file at $ORACLE_HOME/dbs,
    *.log_archive_start=TRUE
    *.log_archive_dest_1='location=<give the path here>'
    *.log_archive_format='arch_%t_%s_%r.arc'
    2. Set the recovery area and size init.ora file at $ORACLE_HOME/dbs,
    *.db_recovery_file_dest='<give the path here>'
    *.db_recovery_file_dest_size=<give the size in number>
    3. Set the flashback retention target init.ora file at $ORACLE_HOME/dbs,
    *.db_flashback_retention_target =<give in number here>
    4. Run the following,
    SHUTDOWN IMMEDIATE;
    STARTUP MOUNT;
    ARCHIVE LOG START;
    ALTER DATABASE ARCHIVELOG;
    ALTER DATABASE OPEN;
    5. Turn on the flashback,
    SHUTDOWN IMMEDIATE;
    STARTUP MOUNT EXCLUSIVE;
    ALTER DATABASE FLASHBACK ON;
    6. Check the status of the flashback,
    select flashback_on from v$database;
    7. Get the SCN number and the timestamp from the below queries,
    a. SQL> select begin_time, flashback_data, db_data, redo_data, estimated_flashback_size from v$flashback_database_stat; 
    b. SQL> select * 2 from v$flashback_database_log;
    8. Run the below to do flashback,
    Shutdown immediate;
    startup mount;
    FLASHBACK DATABASE TO SCN <SCN-Number Identified>
    (or)
    FLASHBACK DATABASE TO TIMESTAMP <time-stamp identified>
    Alter database open resetlogs