Create Multitenant databases with DBCA – Things to Know

Create Multitenant databases with DBCA - Things to KnowWhen you create Multitenant databases with DBCA there are some Things to Know. And in Oracle Database’s Database Creation Assistant (DBCA) there is a common pitfall in the “Options” screen. It was grayed out in the previous release but when you choose to create a “custom” database you can select the options/components now. Be careful …

Previous posts

I did blog several times about the DBCA already:

And there are several other things to know when you create databases with the DBCA.

Create Multitenant databases with DBCA – Things to Know

When the Multitenant team in the Oracle 12.1 days finally allowed to have container databases created with less than the default set of all options, it was too late to change the DBCA. All choices in the OPTIONS screen of DBCA were grayed out as soon as you choose to create a Container Database. You’ve had to use a workaround by editing the scripts. See also MOS Note:2001512.1 (Creating A Container Database (CDB) With A Subset Of Options) for details.

Since Oracle Database the DBCA offers now the choice of options:

Create Multitenant databases with DBCA - Things to Know

DBCA – Options screen with DEFAULT selections when you create a customer Multitenant database . Oracle

It wondered me a bit that APEX is clicked on by default. And the really interesting part which may cause trouble: The components are not chosen to be included in PDBs by default.

The APEX pitfall in Oracle DBCA

What happens if I create my container database exactly as the DBCA proposes? I will get all the above options in the CDB$ROOT container – but none of them in the PDB$SEED. As soon as I provision a new PDB it does not have any options except for the ORACLE SERVER, the WORKSPACE MANAGER and (with status OPTION OFF, the RAC option).

I’d guess this is not always wanted and expected, especially as it can cause trouble later on.

First of all, it’s a good thing to have the options in the CDB$ROOT as you can install them later at will inside any PDB with the usual “create my option” scripts. At least in theory.

APEX: Can’t choose “PDB only” – option is grayed out

And furthermore, the one option you MUST CLICK AWAY for the CDB$ROOT is APEX as this will cause a ton of trouble. APEX should never be installed in the CDB$ROOT but always in the PDB only. Read on here why you must remove APEX from CDB$ROOT. If you want APEX in a PDB you must install it later on manually. I talked to Joel Kallman and he agreed that most people grab the download anyways from OTN and install it right away. Maybe the best thing to do. And just on the side: Since Oracle Database APEX does not get upgraded when you upgrade your database. We are guiding you to the documentation on How to Upgrade Apex in the preupgrade check instead.

A minor PDB pitfall in Oracle DBCA

Anyhow, the second pitfall here: When you chose not to have an option in a PDB it won’t be in the PDB$SEED. The screen does not say that explicitly. And based on feedback by customers the installation routine for adding an option afterwards is not always working straight forward (speaking of JVM).

In this example create my container database with only JVM and SPATIAL:

DBCA – Example of creating a container database with only JVM and SPATIAL – Oracle

This means, all further provisioned PDBs will have JVM and SPATIAL by default. But in case I would like to have MULTIMEDIA later on in any of my PDBs I will have to install it into the CDB$ROOT first, and then in the PDBs I’d like to have it included.

You can’t have any stand-alone options in PDBs only (with one exception: APEX). If you want an option in a PDB it has to exist in the CDB$ROOT first.

The Option-in-PDB-only pitfall in Oracle DBCA

Finally the pitfall which will crash your database creation: if you choose to have an option in a PDB only with the component it depends on not present in the PDB. Does this sound strange to you? DBCA allows you this choice:

Create Multitenant databases with DBCA - Things to Know

DBCA does not take component dependencies into account when selecting PDBS – Oracle

In my example I create JVM, MULTIMEDIA and SPATIAL in the CDB$ROOT, but only MULTIMEDIA in PDBs. This is not a weird choice. And it’s not obvious to everybody that MULTIMEDIA is based on JVM. And as expected, my database creation will fail:

Create Multitenant databases with DBCA - Things to Know

DBCA: Multimedia creation fails as JVM is not present in PDBs but only in CDB$ROOT

Oracle MULTIMEDIA can’t be created in a PDB when JVM is not present in the same PDB. And it’s not in my case.

ERROR at line 1:
ORA-20000: JServer JAVA Virtual Machine component not found. JServer JAVA
Virtual Machine must be installed prior to Oracle Multimedia installation.
ORA-06512: at line 3

This gets tracked as:


2 thoughts on “Create Multitenant databases with DBCA – Things to Know

  1. Thank you Mike for this article and your timing 😉 I was in the midst of creating plenty of single tenant database and indeed ran into these issues 😉

    licensing-wise is it an issue to keep all options in the CDB if you don’t use them in PDB ? from a patching perspective there are quite some issues, more components to patch means : longer patching AND potential issues,….

    on the other hand adding components later might give issues as well as you indicated


    • Thanks Philippe 🙂

      Glad that it came right in time – and good news, they fixed the broken dependencies already. But I think one has to request a backport as the fix goes only into MAIN code and not automatically into

      Hope all goes well 🙂


Leave a Reply

Your email address will not be published. Required fields are marked *