1. Home
  2. Knowledge Base
  3. High Availability
  4. Some FLASHBACK DATABASE examples using RMAN and SQL*PLUS

Some FLASHBACK DATABASE examples using RMAN and SQL*PLUS

Wrong Update

SQL> update customers set credit_limit=100000;

 Shutdown the database

 Startup mount the database

 invoke rman

 $ rman target /

 Flashback database to time one hour prior to current time

 RMAN>  FLASHBACK DATABASE TO TIME ‘(SYSDATE-1/24)’;

 Starting flashback at 27-JUN-05

using target database controlfile instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=156 devtype=DISK

 starting media recovery

media recovery complete

 Finished flashback at 27-JUN-05

 Using SQL*PLUS

 SQL> flashback database to timestamp TO_TIMESTAMP(‘2005-06-27 09:00:00′,’YYYY-MM-DD HH24:MI:SS’);

 Flashback complete.

 SQL> alter database open  resetlogs;

Check the application

 SQL> select credit_limit from customers where rownum < 5;
 CREDIT_LIMIT

————

        2400

        2400

        2400

        1200

The following two tabs change content below.

Gavin Soorma

Latest posts by Gavin Soorma (see all)

Updated on June 2, 2021

Was this article helpful?

Related Articles

Comments

Leave a Comment