Database Reference
In-Depth Information
handle=C:\ORACLE\FAST_RECOVERY_AREA\ORCL\BACKUPSET\2013_09_28
\O1_MF_NNNDF_TAG20130928T185206_4G09OW7B_.BKP tag=TAG20130928T185206
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
Finished restore at 28-SEP-13
RMAN> recover datafile 3;
Starting recover at 28-SEP-13
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:02
Finished recover at 28-SEP-13
RMAN> sql 'alter database datafile 3 online';
sql statement: alter database datafile 3 online
Restoring Database Tablespaces Online
If you have lost most or all data files related to one or more tablespaces, it might be easier to
recover the entire tablespace rather than individual data files. Of course, a tablespace recovery
really is a data file recovery; it just makes RMAN do the extra legwork to figure out which
data files need to be restored. Once the database is up and running or if the database was
already running, follow these steps to restore one or more tablespaces:
1. From the RMAN prompt, take the tablespace(s) offline using the RMAN SQL command
calling the ALTER TABLESPACE OFFLINE command. Do this for each tablespace that you
need to take offline.
2. From the RMAN prompt, restore the tablespace using the RESTORE TABLESPACE
command.
You can restore one or multiple tablespaces in one shot. You will be returned to the
RMAN prompt once the restore is complete.
3. Having restored the tablespace data files, use the RECOVER TABLESPACE command to
recover the tablespace and its associated data files.
This will apply any incremental backups and archived redo logs to the restored
tablespace. You will be returned to the RMAN prompt once the recovery is complete.
4. Bring the data file(s) back online using the RMAN SQL command to issue the ALTER
DATABASE DATAFILE ONLINE SQL command.
This will bring each data file online, completing the recovery process.
Here is an example of a recovery of the USERS tablespace from RMAN (note that if the
database was running, we could use the ALTER TABLESPACE OFFLINE command to take
the tablespace offline):
RMAN> startup
Oracle instance started
database mounted
Search WWH ::




Custom Search