Different database has their own DBID that can make recovery catalog distinguish which is which, but in the same data guard infrastructure, the database, either primary or standby shares one DBID.
It's especially convenient for restoring primary or standby database through catalog with the same DBID, no matter what the backup sets were coming from which database.
That is to say, you can always perform a full backup on standby database instead of the primary. The recovery catalog knows how to use the backup from the standby to restore the primary.
In another case, you might want to duplicate a database through catalog, then you have to fake the source database to get the backup records from the recovery catalog.
The question is, how could one database fake the other to make catalog know which database that you want to restore?
It's SET DBID clause. For example:
[oracle@test ~]$ rman target / catalog owner/password@catdb
3> set dbid 3402520347;
4> set until scn 26593982035;
5> restore database;
6> recover database;
7> alter database open resetlogs;
The very first thing is that you have to know the DBID. Do you? If you don't, you have to find DBID of the source database.