Database Reference
In-Depth Information
Recovering Noncritical Database Data Files and/or Tablespaces
with the Database Open
When you have lost a data file or a few data files or all the data files of one or several
tablespaces, RMAN provides the ability to restore those data files online without having to
shut down the database. This is known as an online data file recovery or online tablespace
recovery . Online recoveries allow users to access unaffected tablespaces/data files of the data-
base without knowing that other parts of the database are unavailable. To be sure, anyone
who tries to use the parts of the database that are being recovered will know that something
is not right, but something working is better than nothing, right?
The SYSTEM and active UNDO tablespaces are considered critical tablespaces and thus are
the only tablespaces that will require recovery of the database with the database down
(see the previous section for a discussion on recovery of these critical tablespaces). Any
other tablespace can be restored with the database running. Let's look at online database
recoveries with data files and then tablespaces in the next sections.
You never need to restore temporary files that are associated with
temporary tablespaces. First, RMAN will never back up the temporary
tablespace, because it does not need to. All RMAN needs to know is that
the temporary tablespace exists, and it knows this by virtue of reading the
control file of the database. Knowing what temporary tablespace and what
tempfiles are needed, RMAN will simply add the tempfiles to the tempo-
rary tablespace after a complete or point-in-time database restore. No data
file restore needed!
Preparing to Restore Data Files or Tablespaces Online
It may be that your database is already shut down and will not start because of the missing
data files. It may or may not make sense to open the database before starting the restore so
users can access unaffected data. To open the database when noncritical data files are miss-
ing, follow these steps:
1. From the RMAN prompt, issue the STARTUP command.
An error will appear indicating the data file that is missing. This will report on just
a single missing data file. You can use the REPORT SCHEMA command to report on any
other missing data files. Any data file with a size of 0 will be a missing data file and will
likely need to be restored. Here is an example of the output from the REPORT SCHEMA
command that indicates the USERS01.DBF data file is missing. Note the 0 value in the
Size(MB) column:
RMAN> report schema;
Report of database schema for database with db_unique_name ORCL
List of Permanent Datafiles
===========================
Search WWH ::




Custom Search