Another screwed up installation! Enough already. I’m going to tell you one way of doing this right.
It is a good idea for Oracle’s ASM binaries to have its own Oracle Home. Time and time again, I’ve come across installations where stuff is just broken because of this. It isn’t that ASM shouldn’t be in its own Oracle Home, it is just that people screw the installations.
Consider a RAC installation. I’m talking 10gR2 here. Oracle is going to start up the listener using the information in ASM’s Oracle Home, not the information in the DB Home. Setting TNS_ADMIN might alter that behavior, but that isn’t my point. My point is that binaries from both DB and ASM homes are going to be running. They both use the same infrastructure (listener), and each instance has expectations about where configurations files are going to be, etc. Where should those configuration files live?
When I created a database using dbca, where does my init.ora file end up? In ?/dbs you might say. Sometimes you’d be right. If you happen to run the dbca that is in the ASM Home, that file will end up in the ASM Home, even if your ORACLE_HOME is set to the DB HOME. I don’t know if this is a bug or a feature, but it is annoying. For all I know is that it has been fixed, but I don’t care, because I wonder what other executables are making assumptions about Oracle Homes.
The solution is simple. When doing ASM or listener activities, set ORACLE_HOME to the ASM Home, and make sure that the binaries in the ASM Home are used. And set ORACLE_HOME to the DB Home when working with the DBs. Putting this into practice can be a pain in the butt. It just so happens that I’ve created some aliases that make dealing with this very simple. I’m happy to share if there is any interest.

