The SET command is used to specify various parameters both inside and outside RUN blocks.
When recreating a database it is necessary to specify the DBID. RMAN uses the DBID to identify automatic controlfile backup files.
The DBID can be obtained from another copy of the database using the following query:
SELECT dbid FROM v$database;
The SET NEWNAME statement is used to specify that data files etc should be relocated by the RESTORE command.
For example to rename a specific data file use SET NEWNAME FOR DATAFILE
SET NEWNAME FOR DATAFILE 24 TO '/u01/oradata/TEST/test_07.dbf';
It is also possible to rename all datafiles using SET NEWNAME FOR DATABASE
SET NEWNAME FOR DATABASE TO '/u01/oradata/TEST/%b';
Note the use of the %b wildcard which matches the base name of every file in the source directory.
SET NEWNAME FOR DATABASE is not supported in Oracle 10.2.0.1
The SET UNTIL statement specifies an SCN at which recovery should stop.
For example:
SET UNTIL SCN 1533392288;