Monday, January 7, 2013

Set flashback database on while database is open

Sometimes there is a handy new feature that i completly overlooked.
Is is since 11gr2 possible to put the database in flashback mode without shutting the database down an start it with startup mount.
That's very handy in Production because it's not always possible to shutdown the database even if it's only for a minut. I found it very handy when a big change on a production database take's place i put the database in flashback mode before starting the change and put it off when the change was succesfull.
When it is not a quick restore with th flashback database option is a very fast solution to restore the database to a point before the change.

SQL> select log_mode,flashback_on,from v$database;
        LOG_MODE        FLASHBACK_ON
              --------------- ---------------
            ARCHIVELOG      NO
SQL> select status from v$instance;
STATUS
------------------------------------
OPEN
Now we going to put the database in flashback mode

SQL> alter database flashback on;
Database altered.


SQL> select log_mode,flashback_on,from v$database;
        LOG_MODE        FLASHBACK_ON
              --------------- ---------------
            ARCHIVELOG      YES

That's it and so simple i forgot it almost.

No comments:

Post a Comment