ORACLE_UNQNAME
New in 11.2 is the environment variable ORACLE_UNQNAME and it is used with the OEM dbconsole. The following are some tests on an 11.2.0.2 Linux system:
$ echo $ORACLE_SID db11g 314:oracle@testvm:/home/oracle [db11g] $ echo $ORACLE_UNQNAME db11g 315:oracle@testvm:/home/oracle [db11g] $ emctl status dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. https://testvm:1158/em/console/aboutApplication Oracle Enterprise Manager 11g is running. ------------------------------------------------------------------ Logs are generated in directory /app/local/oracle/product/11.2.0.2/db_1/testvm_db11g/sysman/log 316:oracle@testvm:/home/oracle [db11g] $ unset ORACLE_SID 317:oracle@testvm:/home/oracle [] $ emctl status dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. https://testvm:1158/em/console/aboutApplication Oracle Enterprise Manager 11g is running. ------------------------------------------------------------------ Logs are generated in directory /app/local/oracle/product/11.2.0.2/db_1/testvm_db11g/sysman/log 318:oracle@testvm:/home/oracle [] $ unset ORACLE_UNQNAME 319:oracle@testvm:/home/oracle [] $ emctl status dbconsole Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name. 320:oracle@testvm:/home/oracle [] $ export ORACLE_SID=db11g 321:oracle@testvm:/home/oracle [db11g] $ emctl status dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. https://testvm:1158/em/console/aboutApplication Oracle Enterprise Manager 11g is running. ------------------------------------------------------------------ Logs are generated in directory /app/local/oracle/product/11.2.0.2/db_1/testvm_db11g/sysman/log 322:oracle@testvm:/home/oracle [db11g] $
However, when working on an 11.2.0.2 DataGuard database with db_unique_name set I had to have ORACLE_UNQNAME set as well. Also note that in the message from the dbconsole that the OEM directory is $ORACLE_HOME/testvm_db11g which is the hostname and SID, but when using db_unique_name this won’t necessarily be the same. Hence I suspect, and will need to run some more tests to prove, that this was added to handle the situation where the SID and the unique name are different.
Entries