Sunday, April 1, 2018

DBCA With Silent Option Fails on CDB when Oracle Text Option is Present

Creating a database using a dbca -silent option fails on a CDB when Oracle text option is present. Following commands tries to create a CDB using a template. The DB the template was created from had the following componetns
COMP_ID    COMP_NAME                                STATUS
---------- ---------------------------------------- ----------
CATALOG    Oracle Database Catalog Views            VALID
CATPROC    Oracle Database Packages and Types       VALID
RAC        Oracle Real Application Clusters         OPTION OFF
XDB        Oracle XML Database                      VALID
OWM        Oracle Workspace Manager                 VALID
CONTEXT    Oracle Text                              VALID
However at the point of running Oracle text related SQL scripts the database creation fails.
dbca -silent -createDatabase -templateName /home/oracle/CDB_template.dbt -gdbName testcdb -sid testcdb -sysPassword testcdb -systemPassword testcdb -pdbAdminPassword testcdb -emConfiguration DBEXPRESS -storageType FS -datafileDestination  /opt/app/oracle/oradata  -recoveryAreaDestination /opt/app/oracle/fast_recovery_area
Creating and starting Oracle instance
1% complete
2% complete
6% complete
Creating database files
7% complete
13% complete
Creating data dictionary views
15% complete
19% complete
23% complete
25% complete
27% complete
29% complete
33% complete
Adding Oracle Text
34% complete
ERROR :java.io.IOException: Error while executing "/opt/app/oracle/product/12.2.0/dbhome_1/ctx/admin/catctx.sql". Refer to "/opt/app/oracle/cfgtoollogs/dbca/testcdb/catctx0.log" for more details. Error in Process: /opt/app/oracle/product/12.2.0/dbhome_1/perl/bin/perl
DBCA Operation failed.
Look at the log file "/opt/app/oracle/cfgtoollogs/dbca/testcdb/testcdb.log" for further details.
There's no information on the catctx0.log (it's empty).
If the same command was run without the -silent option (this would run the GUI but most of the fields will be populated by the template info) the database creation succeeds. Following suceeds
dbca -createDatabase -templateName /home/oracle/CDB_template.dbt -gdbName testcdb -sid testcdb -sysPassword testcdb -systemPassword testcdb -pdbAdminPassword testcdb -emConfiguration DBEXPRESS -storageType FS -datafileDestination /opt/app/oracle/oradata -recoveryAreaDestination /opt/app/oracle/fast_recovery_area 
Only different between the two commands is -silent option.



The issue is not present when dbca -silent is run to create a non-CDB database. It appears to be a combination of CDB and presence of Oracle text is causing the issue.
Oracle confirmed this is related to bug 26921308 (Bug ID Doc 27554155) and fixed in 18.1. At the time of the post a backport for 12.2 is being created.