Databases Reference
In-Depth Information
In Oracle Database 12.1 and above you do not need to have the “sql” prefix. You can give
the “alter database” command directly from the RMAN prompt.
Now, instruct the database to make the copy of the file in the fast recovery area, the
production data file:
RMAN> switch datafile 6 to copy;
datafile 6 switched to datafile copy "+FRA/cdb1/datafile/users.352.790293385"
4.
Recover the copy to make it consistent with the current state of the database:
RMAN> recover datafile 6;
Starting recover at 02-AUG-12
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 02-AUG-12
5.
Bring the recovered data file online:
RMAN> sql 'alter database datafile 6 online';
sql statement: alter database datafile 6 online
Again, in Oracle Database 12.1 and above you don't need to pass the “sql” prefix to the alter database command.
When you bring the data file back online, the tablespace will be brought online as well. The tablespace is now
operational. Don't leave the database using a file in the fast recovery area, though, especially not for the long term.
When you have some time, follow the steps in Recipe 3-14 to switch to the original data file.
if data files belonging to systeM are damaged, the database can be only in the mounted state; not open.
so, step 3 above is not needed. the database must be in mounted state at that step (only for data files of systeM
tablespace).
Note
How It Works
It is important to contrast this recipe's approach to recovery with the traditional Oracle database recovery technique.
If one of your database data files fails, the traditional solution is to restore the data file from your RMAN backup and
then recover it. In summary, the steps are roughly as follows:
1.
Take the tablespace offline (if not already).
2.
Restore the data file from RMAN backup.
3.
Apply the incremental backups.
4.
Recover the data file by applying archived redo logs.
5.
Bring the tablespace online.
 
 
Search WWH ::




Custom Search