Databases Reference
In-Depth Information
Flashing Back a Database from SQL
Problem
You want to flash the database back to a point in time in the past by using SQL statements, not RMAN.
Solution
Like the RMAN approach, several options are available to you in deciding on a reference point to flash back to.
You can flash back to the following:
A specific point in time, specified by date and time
A specific SCN
A named restore point
Common Presteps
We'll describe each option's solution in the following sections. All the solutions have some common steps, just like the
RMAN approach described in Recipe 13-4. Here are those common tasks:
1.
Check how far back into the past you can flash back to. Refer to Recipe 13-6.
Connect as a sysdba user, and shut down the database:
2.
SQL> shutdown immediate
3.
Start the database in mount mode:
SQL> startup mount
This completes the preflashback steps.
Common Poststep
After the flashback operation, you will open the database with the clause resetlogs :
SQL> alter database open resetlogs;
database opened
It's important to open the database in resetlogs mode since the flashback operation performs a point-in-time
recovery, which is a form of incomplete recovery. For more information on incomplete recovery, refer to Chapter 12.
 
Search WWH ::




Custom Search