I am somewhat confused by these terms in the init.ora file:
db_domain
db_name
instance_name
plus the database name which is provided to the create database
command. I do not completely understand how they sum up. I have read the Oracle docs several times but still failed to understand.
As far as I understand, a database can be mounted and used by several instances in a RAC which I do not use. This means that db_name
has to be the same as in create database
?!
This is my setup:
I have 2 machines host1, host2. Both are in the same subdomain dom1.company.net. Both have an instance which hosts the same database but one in for the production system and the other one is the test system.
If I name both data, do I have a name collision?
Thanks for clearing up.
Best Answer
No, you do not have a name collision. Your DB_DOMAIN, DB_NAME, and INSTANCE_NAME can all be identical as long as the databases are on different hosts (as you have indicated). However, as others have stated using the same DB_NAME is a bad idea for anything other than perhaps a recovery operation. A policy enforcing distinct passwords will be broken. Connections will be confused. Most things you can do to ensure that changes are not inadvertently made on production are probably worth the hassle.
Here is the relevant documentation:
DB_DOMAIN
DB_NAME
INSTANCE_NAME