OCP-1Z0-053-V13.02-627题

627.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 resto ing 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

Answer: C


答案解析:

参考:http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta2020.htm#RCMRF90375


Example 3-56 Switching Data File File Names After a Restore to a New Location

Assume that a disk fails, forcing you to restore a data file to a new disk location. After starting RMAN and connecting to the database as TARGET, you can use the SET NEWNAME command to rename the data file, then RESTORE to restore the missing data file. You run SWITCH to point the control file to the new data file and then RECOVER. This example allocates both disk and tape channels.

RUN
{
  ALLOCATE CHANNEL dev1 DEVICE TYPE DISK;
  ALLOCATE CHANNEL dev2 DEVICE TYPE sbt;
  SQL "ALTER TABLESPACE users OFFLINE IMMEDIATE";
  SET NEWNAME FOR DATAFILE '/disk1/oradata/prod/users01.dbf'
                        TO '/disk2/users01.dbf';
  RESTORE TABLESPACE users;
  SWITCH DATAFILE ALL;
  RECOVER TABLESPACE users;
  SQL "ALTER TABLESPACE users ONLINE";
}