Database Reference
In-Depth Information
4. At the prompt, type AUTO ; the RECOVER DATABASE command automatically starts applying
all redo until the database is recovered.
Once database recovery is complete, the RECOVER DATABASE command will return you
to the SQL prompt.
5. Issue the ALTER DATABASE OPEN command to open the database for business.
Note that in this case you have performed a full recovery. Your database should have been
completely restored without any data loss. There is no need to perform a special backup after
this recovery (other than your regularly scheduled backups). In Exercise 2.2, you'll be doing a
full recovery of your database after it has lost all data files.
exeRCiSe 2.2
Recovering the Database from the loss of All Data Files
In this exercise, you will perform a full (complete) database recovery, restoring all data
files It is important to note that this recovery presupposes that the online redo logs and
control files of the database are intact.
1. Back up the database. Details on how to do a full online database backup are found in
Chapter 1.
2. 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 12:24:53 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
Enter password:
SQL> alter database begin backup;
Database altered.
SQL> host cp /oracle01/oradata/orcl/*.dbf /oracle01/backup/orcl
SQL> alter database end backup;
Search WWH ::




Custom Search