Database Administration (MOSC)

MOSC Banner

Difference in pdb level: db_name vs con_name

edited Sep 23, 2020 1:23PM in Database Administration (MOSC) 11 commentsAnswered

Hi

Oracle 19c

I am planning on using this this sys_context(userenv) in one of my scripts. And I stumbled onto the following. So which one should I use.

What is the difference, and can these 2 differ at some point..?

I mean is it possibile to have user created pluggable database where con_name != db_name .?

SQL> col db_name for a15;SQL> col con_name for a15;SQL> select sys_context('userenv', 'con_name') as con_name, sys_context('userenv', 'db_name') as db_name from dual;CON_NAME        DB_NAME--------------- ---------------PDBET           PDBET

For example, here in create and alter statements, does this name refers to db_name or con_name ?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center