Hello experts,
Please can someone help me with this query ? Currently I run this query to identify the instance name in 11g but we have gone to 12.2 with the PDB and CDB.. Obviously running this query returns the CDB name for INSTANCE_NAME.
Is there a way to generate the name of the PDB if it is 12c and if 11g, return the instance name ?
select INSTANCE_NAME,
HOST_NAME,
VERSION,
STARTUP_TIME,
STATUS,
DATABASE_STATUS
from v$instance;
As you see below, the query now returns the CDB instance name in case of 12c, rather than PDB name. Is it possible to have something like "TCDBGQ061 - PDB_NAME" if it is a 12c container ?
INSTANCE_NAME
----------------
HOST_NAME
----------------------------------------------------------------
VERSION STARTUP_T STATUS DATABASE_STATUS
----------------- --------- ------------ -----------------
TCDBGQ061
xcu01d************
12.2.0.1.0 25-JAN-19 OPEN ACTIVE
Thanks in advance