Restoring and Recovering All Datafiles
In this scenario, it is assumed that your control files are still accessible. Your first step is to make sure that the target database is shut down:
SQL>connect sys/harakhat as SYSDBA;SQL>shutdown abort;ORACLE instance shut down.
Next, you need to start up your target database in mount mode. RMAN cannot restore datafiles unless the database is at least in mount mode, because RMAN needs to be able to access the control file to determine which backup sets are necessary to recover the database. If the control file isn’t available, you have to recover it first. Issue the STARTUP MOUNT command shown in the following example to mount the database:
SQL> startup mount;
Oracle instance started.
Total System Global Area 309809312 bytes
Fixed Size 7388 bytes
Variable Size 145715200 bytes
Redo Buffers 180224 bytes
Database mounted.Since backup set files are created in an RMAN-specific format, you must use RMAN to restore the datafiles. To use RMAN, connect to the target database:
$ rman target / catalog rman_901/rman_901_pwd@rman_catalog
Recovery Manager Release 9.0.1.0.0 - Production
connected to target database: BRDSTN (DBID=664610428)
connected to recovery catalogThe remainder of this example shows how to restore all of the datafiles of the target database. RMAN will go to its last good backup set and restore the datafiles to the state they were in when that backup set was created.
When restoring database files with Oracle9i, RMAN reads the datafile ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access