The following are new clauses and format options for the SET NEWNAME command at 11gR2:

– SET NEWNAME FOR TABLESPACE
– SET NEWNAME FOR DATABASE

And the following variables are introduced for SET NEWNAME:

%b – The file name remains same as the original. For example, if a datafile is named D:\oracle\oradata\matrix\test.dbf, then %b results in test.dbf.
%f – Specifies the absolute file number of the datafile for which the new name is generated.
%I – Specifies the DBID.
%N – Specifies the tablespace name.
%U – Specifies the following format: data-D-%d_id-%I_TS-%N_FNO-%f.

The main benefit is that improves flexibility of RESTORE, DUPLICATE, and TSPITR operations.

As per example, at earlier versions of oracle we were forced to mention the SET NEWNAME command to rename the duplicate datafiles while restoring/duplicating the database, mentioning each and every datafile at command line.

# set new filenames for the datafiles
SET NEWNAME FOR DATAFILE 1 TO ‘/dup/oracle/oradata/trgt/system01.dbf’;
SET NEWNAME FOR DATAFILE 2 TO ‘/dup/oracle/oradata/trgt/undotbs01.dbf’;

At 11gR2 using the new SET NEWNAME FOR DATABASE has made all things easier to us (all done in one command), if you want to do it at datafile level th.

In the end the main diferences between DB_FILE_NAME_CONVERT and SET NEW NAME are the restrictions and flexibility. SET NEW NAME allows you to change the locations of datafiles as per example in one single command without the need to specify one by one (your process will not fail due that you misspell a datafile path or forgot to include a path as it will occurr when using DB_FILE_NAME_CONVERT) it also supports ASM disk groups. You cannot use the DB_FILE_NAME_CONVERT clause of the DUPLICATE command to control generation of new names for files at the duplicate instance that are in the Oracle Managed Files (OMF) format at the source database instance.