In the case that you need to restore control file or
spfile using RMAN , you need to set the DBID first.
In order to determine the DBID login as rman in rman catalog
and issue the following sql:
sqlplus rman/***@rman
sql>select dbid from rc_database where name='DBNAME';
Another way to find out the DBID is from your RMAN logs.
Example:
RMAN> set dbid 1150787593
executing command: SET DBID
database name is "ORCL" and DBID is 1150787593
RMAN> restore spfile;