Restoring Specific Tablespaces/Datafiles

With Oracle9i, restoring a tablespace or a datafile can be a very straightforward task. If you are recovering the tablespace or datafile while the database is up, you must first take the tablespace or datafile offline. In the following example, we restore and recover the USERS tablespace:

RMAN> restore tablespace users;
RMAN> recover tablespace users;

Instead of a tablespace, you can restore and recover a specific datafile:

RMAN> restore datafile
2> '/d0101/oradata/brdstn/users_01.dbf'
RMAN> recover datafile
2> '/d0101/oradata/brdstn/users_01.dbf'

With Oracle8i, the syntax for restoring a tablespace is only slightly more involved, because the ALLOCATE, RESTORE, and RECOVER commands are used, and they must be wrapped by the run{} command:

RMAN> run { 
2> allocate channel d1 type disk;
3> restore tablespace users;
4> recover tablespace users; }

Get Oracle RMAN Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.