23 In Recovery Manager (RMAN), you are taking image copies of the data files of your production data

23
In Recovery Manager (RMAN), you are taking image copies of the data files of your production database
and rolling them forward at regular intervals. You attempt to restart your database. After a regular
maintenance task, you realize that one of the data files that belongs to the USERS tablespace is damaged
and you need to recover the data file by using the image copy. Because a media failure caused the data
file to be damaged, you want to place the data file in a different location while restoring the file.
Which option must you consider for this task?
A. using only the RMAN SWITCH command to set the new location for the data file
B. placing the database in the MOUNT state for the restore and recovery operations.
C. using an RMAN RUN block with the SET NEWNAME and then the SWITCH command.

D. configuring two channels: one for the restore operation and the other for the recovery operation










Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:

Explanation:
http://download.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmconc2.htm
RMAN automates the procedure for restoring files. You do not need to go into the operating system, locate
the backup or copy that you want to use, and manually copy files into the appropriate directories. When
you issue a RESTORE command, RMAN directs a server session to restore the correct backups and
copies to either:
The default location, overwriting the files with the same name currently there
A new location, which you can specify with the SET NEWNAME command
To restore a datafile, either mount the database or keep it open and take the datafile to be restored offline.
When RMAN performs a restore, the RESTORE command creates the restored files as datafile copies and
records them in the repository. The following table describes the behavior of the RESTORE, SET
NEWNAME, and SWITCH commands.

For example, if you restore datafile ?/oradata/trgt/tools01.dbf to its default location, then RMAN restores
the file ?/oradata/trgt/tools01.dbf and overwrites any file that it finds with the same filename. If you run a
SET NEWNAME command before you restore a file, then RMAN creates a datafile copy with the name
that you specify. For example, assume that you run the following commands:
SET NEWNAME FOR DATAFILE '?/oradata/trgt/tools01.dbf' TO '/tmp/tools01.dbf';
RESTORE DATAFILE '?/oradata/trgt/tools01.dbf';
In this case, RMAN creates a datafile copy of ?/oradata/trgt/tools01.dbf named /tmp/tools01.dbf and
records it in the repository.
To change the name for datafile ?/oradata/trgt/tools01.dbf to /tmp/tools01.dbf in the control file, run a
SWITCH command so that RMAN considers the restored file as the current database file. For example:
SWITCH DATAFILE '/tmp/tools01.dbf' TO DATAFILECOPY '?/oradata/trgt/tools01.dbf';
The SWITCH command is equivalent to the SQL statement ALTER DATABASE RENAME FILE.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值