Database Reference
In-Depth Information
If you should need to do a recovery after a RESETLOGS operation, simply restore the same
backup that you used to do the point-in-time recovery and recover using that backup. You
can do full recovery or point-in-time recovery using the redo associated with the new incar-
nation. In Exercise 2.3, you'll perform a point-in-time recovery.
exeRCiSe 2.3
Performing a Point-in-Time Recovery
In this exercise, you will do a point-in-time recovery by restoring the database to a previ-
ous SCN.
1. Back up the database. Details on how to do a full online database backup are found in
Chapter 1. In summary, follow these steps:
First, put the database in hot backup mode.
Copy all database data files to a backup location.
Take the database out of hot backup mode.
Force a log switch. Back up the archived redo logs.
Here is an example of a backup:
[oracle@localhost orcl]$ sqlplus "/ as sysdba"
SQL*Plus: Release 12.1.0.1.0 Production on Tue Feb 18 14:22:34 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing
options
SQL> alter database begin backup;
Database altered.
SQL> host cp /oracle01/oradata/orcl/*.dbf /oracle01/backup/orcl
SQL> alter database end backup;
Database altered.
SQL> alter system switch logfile;
System altered.
SQL> host cp /oracle01/backup/arch/* /oracle01/backup/orcl/*
SQL> alter database backup controlfile to trace;
Database altered.
SQL> alter database backup controlfile to '/oracle01/oradata/orcl/control1.bak';
Database altered.
2. Next, log into the database as SCOTT/TIGER and create a new table. Insert two
records into the new table and commit the insert:
Search WWH ::




Custom Search