I have a legacy application which uses a lot of PL/SQL stored procedures. It has a deeply ingrained need to know in which environment it is running, and uses the INSTANCE_NAME for that. For the sake of this question, treat this as a hard requirement, please.
The production DB is going to run on a dedicated pair of physical servers currently being installed in Data Guard failover / hot standby mode (Oracle RDBMS 188.8.131.52.0). I.e., not a RAC cluster; only one DB per server, only one instance per server. It will also use the Observer to detect problems and possibly instigate failover/switchover. The DB use will never change in the future (i.e., it will never host other applications or something like that). When asked to make sure that whatever machine is currently active, the PL/SQL "sees" the same INSTANCE_NAME, the DBA was very confused and thought that's unusual/hard/impossible, but then he's never setup this exact configuration.
I tried to find a spot in the Oracle docs that tells me what the usual way to work with the INSTANCE_NAME in such a standby scenario is, but am finding very little (or rather no) specific information. I do know what INSTANCE_NAME, DB_NAME, DB_UNIQUE_NAME, SID, SERVICE_NAMES generally mean and what Oracle uses them for; I just don't know whether Data Guard / Observer have any requirements regarding sameness of the INSTANCE_NAME on primary and standby, or if they don't care.
Please, in your answer, try to mention:
- Are there important technical reasons to have different INSTANCE_NAMEs for the primary and standby - and would it be hard to make sure that after a failover, the new primary takes on the same INSTANCE_NAME?
- Are there "soft" architectural reasons for the same? I.e., "what would you do if you could freely decide one or the other way?"
- Can you point to a part of the official documentation which supports either? There is a definite human part to the question as well - I need to either convince the DBA guys to make the INSTANCE_NAME the same (or at least keep it after failover); or the software guys to change their software, and want as much objective ammunition as possible for either of those discussions...
My feeling (and experience from a short stint in a DBA role back in the good old Oracle 8/9/10 days) tells me that it should be easy, bordering on trivial, to keep the INSTANCE_NAME after failover (specifically considering that there are physically separate servers, and the INSTANCE_NAME is ephemereal), but have no experience with 11+.