I did blog about several things-to-know with DBCA (Database Configuration Assistant) in the past. And one issue came up in our internal mailing list the other day. Be aware of database options selections for PDBs in DBCA. Missing one or the other “click” may bring you in trouble later on. I blogged about this already a while ago but this was only part of a larger post: Create Multitenant Databases with DBCA – Things to Know.
Be aware of database options selections for PDBs in DBCA
When you create a custom container database with DBCA you will see this screen. It allows you to select the options you’ll create in the CDB$ROOT and in PDBs.
In the past I mentioned already that:
- You can choose your option set for container databases, even in Oracle 12.1
- Why you should keep out APEX from CDB$ROOT
- And here I pointed out Things to Know with DBCA when you create a container database
And this post contains also a recommendation about what happens when you don’t click “Include in PDBs”. But as it is hidden in a general blog post I decided to write a separate one (this one here) today again.
If you don’t click, it won’t be in the PDB$SEED
The PDB$SEED is a strange vehicle. The purpose of its existence is the quick provisioning of PDBs. When you “create” a new pluggable database it will be cloned from the PDB$SEED. The Multitenant team has taken this design decision a long time ago. And the PDB$SEED is read-only and not supposed to get any changes by a user. As a result a lot of other things happened. The _ORACLE_SCRIPT parameter got introduced. And so on.
Anyhow, in the above screen shot you spot 6 options/components to be created in the CDB$ROOT. But none of them in PDB$SEED.
- Don’t include APEX in CDB$ROOT and install it later in the PDB locally
- Click only the options you want and need in CDB$ROOT
- Click the same options “Include in PDBs” when necessary
The last bullet point is the one where you need to be careful with. If you miss the click for, lets say “Oracle OLAP” you will have the OLAP option in the CDB$ROOT only. This may or may not be ok. You have to justify carefully. If you dn’t click the check box “Include in PDBs” the OLAP option won’t be in the PDB$SEED. And all newly provisioned PDBs won’t have it.
The good part:
If you created the option in the CDB$ROOT only you’ll ease your plugin operations later on as you minimize the chance to see a situation where a PDB has an option/component but the CDB$ROOT misses it.
The not-so-good part:
Your upgrade of the CDB$ROOT will take longer, you may need patches for components you may not even use (OJVM is one of the usual suspects).
I learned today that a bug got logged for the DBCA behavior:
Bug 24306129 : DBCA HELP DOES NOT MENTION ‘INCLUDE IN PDBS’ CHECKBOX IN DB OPTIONS SELECTION
But I didn’t verify the behavior in Oracle 18c yet.
–Mike
Two questions:
01. If I do not include these options in PDB (leave the “Include in PDBs” box unchecked), can I install these options later when creating a PDB? If not, then is there any way to install these options subsequently without shutting down all the PDBs?
02. If I check the “Include in PDBs” box, and I do not have license for these options, then would these show up in the LMS audit scripts from Oracle? Would I be in license violation?
I created a CDB with one PDB in 18c. Only the Oracle JVM and Oracle Text option were selected and “Include in PDBs” was checked only for these two components. Querying the DBA_REGISTRY while connected to the PDB, I see:
CATALOG
CATPROC
RAC
JAVAVM
XML
CATJAVA
XDB
OWM
CONTEXT
Thanks,
Arun
Hi Arun,
I can clearly answer question 2:
No. DBA_FEATURE_USAGE_STATISTICS would only tick up the counter when you use things. The pure installation does not harm you in any way.
Regarding question 1:
Yes, you can. And you can install things in a PDB only of course once it is present in the CDB$ROOT. The “danger” is to try to install for instance SPATIAL in a PDB when it’s not in the CDB$ROOT. This is on my list of blog-posts-to-write – but I haven’t had time for it yet.
Cheers,
Mike
Mike,
Another question. I select all options (excluding APEX) to be in CDB and PDB. I create a CDB without any PDB (empty container) and then I plug in a non-CDB as a PDB. The non-CDB has lot less options than than the CDB. When I perform plug operation, I get warning about missing components in PDB. This warning is logged every time in the PDB_PLUG_IN_VIOLATIONS when I stop/start the PDB. Is this expected behavior? Any issues, downside?
Database option APS mismatch: PDB installed version NULL. CDB installed version 18.0.0.0.0.
Database option CONTEXT mismatch: PDB installed version NULL. CDB installed version 18.0.0.0.0.
Database option DV mismatch: PDB installed version NULL. CDB installed version 18.0.0.0.0.
Database option OLS mismatch: PDB installed version NULL. CDB installed version 18.0.0.0.0.
Database option ORDIM mismatch: PDB installed version NULL. CDB installed version 18.0.0.0.0.
Thanks,
Arun
Arun,
see here:
https://mikedietrichde.com/2018/04/06/purging-of-pdb_plug_in_violations-in-oracle-18c/
Cheers,
Mike
Hi Mike,
For several versions (from 11 to 12.2 EE) I am using dbca in silent mode using a template mixed with overwritten parameters. Disabling all features.
In 18c :
Part of my template:
This is the full command I use:
dbca -silent -createDatabase -templateName ASM_template_18.0.dbt -continueOnNonFatalErrors true -sysPassword change_on_install -systemPassword manager -gdbname db18 -sid db18 -emConfiguration NONE -dbsnmpPassword welcome1 -storageType ASM -diskGroupName DATA -recoveryAreaDestination +DATA -asmsnmpPassword welcome1 -recoveryGroupName DATA -redoLogFileSize 50 -useOMF true -variables db_recovery_file_dest_size=10000M
I have the following Error:
Only when using “-createAsContainerDatabase true” I get the following problem:
[ 2018-08-07 18:32:30.509 IDT ] [FATAL] Error while executing “/oracle/product/18.0.0.0/dbhome_1/rdbms/admin/catalog.sql”. Refer to “/oracle/base/cfgtoollogs/dbca/db18/catalog0.log” for more details. Error in Process: /oracle/product/18.0.0.0/dbhome_1/perl/bin/perl
Is this familiar problem?
Any idea what is wrong ?
Thanks
Yossi
Hi Yossi,
sorry to hear that. And I haven’t seen this before.
Please open an SR. Support need to know about that and may have a solution potentially.
Cheers,
Mike