Oracle db_name, db_unique_name, and ORACLE_HOME I'm studying Oracle and I would like to understand the uniqueness or constrains when assigning these parameters.

Suppose a machine with a single OS (host) and 2 different databases (physical). Are they forced to use different db_name in following cases?


They share ORACLE_HOME
They don't share ORACLE_HOME


How is this related when db_unique_name enters in the game? What's the point?

So far reading in Forums and offical Docs I got the following assumption :

EDITED

This is what created me confusion: http://www.mail-archive.com/oracle-l@fatcity.com/msg10241.html

Then, you could have following situations:


Repeated DB_NAME is not possible within the same ORACLE_HOME (no matter OS and SID) for the DB_NAME is stenciled onto the files for that DB. There are 2 exceptions (Parallel Server/RAC though they are indeed different instances of the same database, and Primary-Standby systems, where need a common DB_NAME and Oracle provides us with the DB_UNIQUE_NAME mechanism)
For different ORACLE_HOMEs, it is possible as each installation does not see the other and they don't conflict when sharing DB_NAME, but is strongly undesirable. Besides, on Windows, every instance is mapped to a service OracleService%SID%, so that makes impossible to have two different SIDs on the same OS, even if an instance ID is defined as ORACLE_HOME + ORACLE_SID. But as by default (and it's an ORACLE recommendation for conventional setups) DB_NAME = SID, even in different ORACLE_HOME, 2 databases in Windows are likely to fail due to a SID default name that is common (so the second service cannot be created).


... but more authoritative answers are still welcome!
You can have 2 databases with the same db_name on the same system on linux in the same ORACLE_HOME. You just have to make sure that the instance name differs. EG different pfile/spfile,... It's just not advised to give them the same name...
When running the runinstaller you just give them the same global name and a different SID. 
--> Not sure how Windows reacts on it.
The reason why the db_name has to be the same in a primary-standby setup is because the name is "imprinted" on the datafiles. The db_unique_name is mandatory in order to make a difference between the databases and to setup a syncing. The recovery would be impossible if you use a different db_name