Re: How get current container DBID using sys_context ('userenv'?

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Mon, 30 Sep 2019 14:51:09 -0400
Message-ID: <0d7a12d8-3fca-2b9c-51dd-3881bdd663d6_at_gmail.com>



I would not use DBID column for PDB databases. I would use GUID column which is guaranteed to be unique.

On 9/30/19 1:13 PM, Luis Claudio Dias dos Santos wrote:
> Hi
>
> I have a CDB with two PDBS.
>
> U71013576_at_P11CDB6.ecc03cas06vm01 [18c RAC] select  sys_context
> ('userenv','CON_NAME') from dual;
>
> SYS_CONTEXT('USERENV','CON_NAME')
> ---------------------------------------------------------------------------------------------------
> CDB$ROOT
>
> In other words: ('userenv','DBID')  is not following
> ('userenv','DB_NAME'), but ('userenv','DB_UNIQUE_NAME').
>
>
>

You can adopt unique names. I have an inexhaustible reservoir of DB names: "NANCY", "MITCH", "ADAM", "AOC","LINDSAY","ILHAN", "RAND". You can combine them as you like. The funny thing is that when I get sick of these names, I will get another batch. Every 2 years  the set gets renewed.

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Sep 30 2019 - 20:51:09 CEST

Original text of this message