Multitenancy: is a Proxy PDB part of the 3 free PDBs at 19c?

Multitenancy: is a Proxy PDB part of the 3 free PDBs at 19c?

Published on: Category: Oracle

As most of us know, Oracle Database 19c now supports up to 3 pluggable databases (PDBs) per container database (CDB) without requiring additional multitenant license—applicable for both Standard Edition (SE2) and Enterprise Edition (EE). This documentation clearly states: “For all offerings, if you are not licensed for Oracle Multitenant, then you may have up to 3 user-created PDBs in a given container database at any time.” Meaning it’s about user-created PDBS.

But is a Proxy PDB (in fact a kind of symbolic link in Linux terms) considered user-created, or are you allowed to have 4 PDBs in theory? Once, I attended a presentation of Carajandb (Johannes Ahrends) in Germany, who stated that a Proxy PDB is free to use, based on the 18c documentation.

A part of his slide:

Source:

This isn’t clearly stated in the licensing documentation of 19c, so I wanted more proof.

Let’s start with the beginning: what is a Proxy PDB, why should you want it, and how do you install it? Oracle-base has a nice blogpost regarding this. In my own words: A Proxy DB is just a serving hatch. You think you’re talking to one database, but all your commands and data are actually transported to another PDB. This can be useful when you migrate the PDB (to the cloud), or when you don’t want or can’t change anything on the clients. 

By the way: When you feel more comfortable with a lazier explanation, you can watch this YouTube-video of Tim Hall about Proxy PDBs.

Below, you’ll find some tests I did to familiarize myself.

I created two regular ‘user-created’ PDBs:

  1. SQL> show pdbs
  2. CON_ID CON_NAME OPEN MODE RESTRICTED
  3. ---------- ------------------------------ ---------- ----------
  4. 2 PDB$SEED READ ONLY NO
  5. 3 PDB1 READ WRITE NO
  6. 5 PDB2 READ WRITE NO

The Seed PDB doesn’t count, so there are two PDBS.

I’m setting the parameter MAX_PDBS to 2.

  1. ALTER SYSTEM SET MAX_PDBS=2;

This parameter counts user-created PDBs, according to the documentation.

Only user-created PDBs are counted. PDB$SEED, application seed, and application root clones are ignored.

I played around and tested if it is fool proof, trying to set the parameter below the number of PDBs:

  1. SQL> alter system set max_pdbs=1;
  2. alter system set max_pdbs=1
  3. *
  4. ERROR at line 1:
  5. ORA-32017: failure in updating SPFILE
  6. ORA-65334: invalid number of PDBs specified

Yep. Works as designed.

So, the creation of an extra user-created PDB shouldn’t work either:

  1. SQL> create pluggable database pdb3 admin user pdbadmin identified by testjob;
  2. create pluggable database pdb3 admin user pdbadmin identified by testjob
  3. *
  4. ERROR at line 1:
  5. ORA-65010: maximum number of pluggable databases created

When a Proxy PDB isn’t considered a ‘user-created’ PDB – as the PDB$SEED – then I will be able to create this. It will be the ultimate proof that we are allowed to use the Proxy DB within the 3 free PDBs. After some preparation (referenced PDB in local undo mode, archivelog mode, referenced PDB in open read/write mode):

  1. SQL> create pluggable database pdb6 as proxy from pdb1@link_to_pdb1_in_cdb2;
  2. create pluggable database pdb6 as proxy from pdb1@link_to_pdb1_in_cdb2
  3. *
  4. ERROR at line 1:
  5. ORA-65010: maximum number of pluggable databases created

Same as a user-created PDB: Until now, it looks like a Proxy PDB is part of the MAX_PDBS parameter and is considered a user-created PDB.

Is there an LMS-source I can use? The script they used before 19c (ReviewLite17.2.sql):

  1. PROMPT *** MULTITENANT (introduced in 12c_r1)
  2. PROMPT ======================================================================
  3. PROMPT * Looking for pluggable databases (PDB)
  4. col OPEN_TIME format a20 wrap
  5. select
  6. b.CDB,
  7. a.CON_ID,
  8. a.NAME,
  9. a.OPEN_MODE,
  10. a.OPEN_TIME,
  11. decode(a.CON_ID, 0, 'entire CDB or non-CDB', 1, 'ROOT', 2, 'SEED', 'PDB') as CONTAINER
  12. from V$CONTAINERS a, V$DATABASE b
  13. order by a.CON_ID;
  14. PROMPT If more than one PDB container is returned, then Multitenant Option is in use

In this script, there’s no distinction between Proxy PDB and regular ones. Unfortunately, I haven’t got the script LMS is using for the 19c version yet.

As a last resort (reluctant to do this), I finally asked LMS.

My question: Is a Proxy DB and Application-Root Container considered a ‘user-created’ PDB in 19c and onward? With other words, are you allowed for example to have 3 ‘normal’ databases and 1 Proxy DB without having to buy a Multitenancy license?

Answer: Root container  (CDB$ROOT) and Proxy DB are not counted. Root container is used only by the Oracle DB to administrates the PDBs. The proxy DB is just a link to a physical PDB.

So the answer is YES. The customer can use 1 CDB 1 Proxy and 3 PDBs without the need to buy Multitenant.

Quite clear about the Proxy PDB: It is NOT a user-created PDB!

The Application-Root container is likely to be the same as the definition of MAX_PDBs: application seed and application root clones.

At last, I got an answer for this tiny little question that bothered me sometimes.

Resources

19c licensing doc: https://docs.oracle.com/en/database/oracle/oracle-database/19/dblic/Licensing-Information.html#GUID-0F9EB85D-4610-4EDF-89C2-4916A0E7AC87 

Carajandb presentation: https://www.doag.org/formes/pubfiles/10799504/2018-DB-Johannes_Ahrends-Multitenant_in_der_Standard_Edition-Praesentation.pdf

Preparations for a Proxy PDB: https://blog.toadworld.com/2017/05/24/oracle-database-12cr2-new-feature-proxy-pdb

Oracle-base blog-post:  https://oracle-base.com/articles/12c/multitenant-proxy-pdb-12cr2 

Oracle-base blog-post: https://oracle-base.com/articles/12c/multitenant-prevent-accidental-creation-of-pdb-12cr1

Oracle-base YouTube: https://www.youtube.com/watch?v=5GmN4l8Vrh4

MAX-PDBS parameter in 19c: https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/MAX_PDBS.html#GUID-55526BAC-DCB2-4C76-9ACF-1E3D2047E267 

18c licensing doc: https://docs.oracle.com/en/database/oracle/oracle-database/18/dblic/Licensing-Information.html#GUID-0F9EB85D-4610-4EDF-89C2-4916A0E7AC87 

Job Oprel
About the author Job Oprel

Job Oprel is a Solution Architect working for Qualogy with special interest in HA, hybrid cloud environments and Oracle software costs. In 2020, Job was appointed Oracle ACE Associate for his contributions to the Oracle community.

More posts by Job Oprel
Comments
Reply