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 12.2.0.1’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 12.2.0.1 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 12.2.0.1

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 12.2.0.1 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 12.2.0.1 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 12.2.0.1 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 12.2.0.1

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 12.2.0.1 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 12.2.0.1

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.

begin
*
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:
Bug 26828024 – DBCA 12.2 DOES NOT CONSIDER COMPONENT DEPENDENCIES FOR PDBS – CRASHES

–Mike

Share this: