ORACLE_UNQNAME is an operating system environment variable that holds the database’s unique name value. You can find it with the following query as the
SYSTEM user (through SQL*Plus):
SELECT name, db_unique_name FROM v$database;
The following link will give more detail.
New in 11.2 is the environment variable ORACLE_UNQNAME and it is used with the OEM dbcoconsole. The value for db_unique_name database parameter is the value for ORACLE_UNQNAME...
For a Standalone server, most probably the ORACLE_UNQNAME and ORACLE_SID would be same. So when u run or check the status of dbconsole, it may ask you to set "Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name". You can set and proceed.
For RAC, the dbconsole service runs as a single service. Assume you have 3 node RAC with ORCL database running on all 3. And obviously orcl1, orcl2 and orcl3 are the 3 instances. Assume the dbconsole service is running on node 2, then you need to set ORACLE_UNQNAME=orcl (i.e. db_unique_name) in that node 2(since the service is running in that machine.
For Dataguard, You would've created a separate db_unique_name for primary and standby databases(recommended), eventhough the database name(db_name) is same for both primary and standby. So in that case, you can use db_unique_name from where the dbconsole service is running to set the ORACLE_UNQNAME
Yes , You are conceptually right. But again you need to see where the dbconsole service is running. If its running in node1, set OS environment variable ORACLE_UNQNAME = racdb in node 1 to run the dbconsole. If the dbconsole service is running in node2, set ORACLE_UNQNAME = racdb in node 2... Hope this would've cleared .. :-)