only run the SET DBID command in the following specialized circumstances:
Example:
The following shell script uses the DBID to restore the control file because multiple target databases share the same DB_NAME in the catalog.
After you have restored the target control file, you can mount the database to restore the rest of the database:
rman TARGET / CATALOG rman/rman@catdb <<EOF
STARTUP FORCE NOMOUNT;
SET DBID = 862893450; # needed to distinguish target from others with same DB_NAME
RESTORE CONTROLFILE; # assuming catalog has automatic channel allocation information
ALTER DATABASE MOUNT;
EOF
If you do not set the SET DBID clause, system will report error below; “RMAN-20005: target database name is ambiguous” .