Forum Stats

  • 3,875,206 Users
  • 2,266,870 Discussions
  • 7,912,109 Comments

Discussions

Error when creating Oracle12c PDB using DBCA response file in silent mode

1041779
1041779 Member Posts: 2
edited Aug 6, 2014 12:42PM in Multitenant

I am getting an Oracle dbca NullPointerException when trying to create a PDB (Pluggable Database) usingdbca response file in silent mode.

I have a Oracle 12c CDB up and running, listener is also up, $ORACLE_HOME and $ORACLE_SID are also set correctly.

After database install and creating CDB using response files, I am now trying to create a PDB using dbca response file. Contents of dbca.rsp -

<span class="pun" style="background: transparent;">[</span><span class="pln" style="background: transparent;">GENERAL</span><span class="pun" style="background: transparent;">]</span><span class="pln" style="background: transparent;"> </span>
<span class="pln" style="background: transparent;">RESPONSEFILE_VERSION </span><span class="pun" style="background: transparent;">=</span><span class="pln" style="background: transparent;"> </span><span class="str" style="color: #800000; background: transparent;">"12.1.0"</span><span class="pln" style="background: transparent;"> </span>
<span class="pln" style="background: transparent;">OPERATION_TYPE </span><span class="pun" style="background: transparent;">=</span><span class="pln" style="background: transparent;"> </span><span class="str" style="color: #800000; background: transparent;">"createPluggableDatabase"</span><span class="pln" style="background: transparent;"> </span>
<span class="pln" style="background: transparent;"></span><span class="pun" style="background: transparent;">[</span><span class="pln" style="background: transparent;">CREATEPLUGGABLEDATABASE</span><span class="pun" style="background: transparent;">]</span><span class="pln" style="background: transparent;"> </span>
<span class="pln" style="background: transparent;">SOURCEDB </span><span class="pun" style="background: transparent;">=</span><span class="pln" style="background: transparent;"> </span><span class="str" style="color: #800000; background: transparent;">"orcl"</span><span class="pln" style="background: transparent;"> </span>
<span class="pln" style="background: transparent;">PDBNAME </span><span class="pun" style="background: transparent;">=</span><span class="pln" style="background: transparent;"> </span><span class="str" style="color: #800000; background: transparent;">"dev"</span><span class="pln" style="background: transparent;"> </span>
<span class="pln" style="background: transparent;">CREATEPDBFROM </span><span class="pun" style="background: transparent;">=</span><span class="pln" style="background: transparent;"> </span><span class="str" style="color: #800000; background: transparent;">"DEFAULT"</span><span class="pln" style="background: transparent;"> </span>
<span class="pln" style="background: transparent;">PDBADMINUSERNAME </span><span class="pun" style="background: transparent;">=</span><span class="pln" style="background: transparent;"> </span><span class="str" style="color: #800000; background: transparent;">"oracle"</span><span class="pln" style="background: transparent;"> </span>
<span class="pln" style="background: transparent;">PDBADMINPASSWORD </span><span class="pun" style="background: transparent;">=</span><span class="pln" style="background: transparent;"> </span><span class="str" style="color: #800000; background: transparent;">"oracle"</span><span class="pln" style="background: transparent;"> </span>
<span class="pln" style="background: transparent;">CREATEUSERTABLESPACE </span><span class="pun" style="background: transparent;">=</span><span class="pln" style="background: transparent;"> </span><span class="str" style="color: #800000; background: transparent;">"true"</span><span class="pln" style="background: transparent;">  </span>

I tried following commands:

<span class="pln" style="background: transparent;">dbca </span><span class="pun" style="background: transparent;">-</span><span class="pln" style="background: transparent;">silent </span><span class="pun" style="background: transparent;">-</span><span class="pln" style="background: transparent;">responseFile </span><span class="pun" style="background: transparent;">/<</span><span class="kwd" style="color: #00008b; background: transparent;">file</span><span class="pln" style="background: transparent;"> path</span><span class="pun" style="background: transparent;">>/</span><span class="pln" style="background: transparent;">dbca</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">rsp dbca </span><span class="pun" style="background: transparent;">-</span><span class="pln" style="background: transparent;">silent </span><span class="pun" style="background: transparent;">-</span><span class="pln" style="background: transparent;">createPluggableDatabase </span><span class="pun" style="background: transparent;">-</span><span class="pln" style="background: transparent;">responseFile </span><span class="pun" style="background: transparent;">/<</span><span class="kwd" style="color: #00008b; background: transparent;">file</span><span class="pln" style="background: transparent;"> path</span><span class="pun" style="background: transparent;">>/</span><span class="pln" style="background: transparent;">dbca</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">rsp</span>

Both give same error:

<span class="com" style="color: #808080; background: transparent;">---- Begin output of /u01/app/oracle/product/12c/db_1/bin/dbca -silent -responseFile /<file path>/dbca.rsp</span><span class="pln" style="background: transparent;"> </span>
<span class="pln" style="background: transparent;">STDOUT</span><span class="pun" style="background: transparent;">:</span><span class="pln" style="background: transparent;"> </span>
<span class="pln" style="background: transparent;">STDERR</span><span class="pun" style="background: transparent;">:</span><span class="pln" style="background: transparent;"> Exception </span><span class="kwd" style="color: #00008b; background: transparent;">in</span><span class="pln" style="background: transparent;"> thread </span><span class="str" style="color: #800000; background: transparent;">"main"</span><span class="pln" style="background: transparent;"> java</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">lang</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">NullPointerException </span>
<span class="pln" style="background: transparent;">at oracle</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">sysman</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">assistants</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">dbca</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">backend</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">CommandLineArguments</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">processResponseFile</span><span class="pun" style="background: transparent;">(</span><span class="pln" style="background: transparent;">CommandLineArguments</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">java</span><span class="pun" style="background: transparent;">:</span><span class="lit" style="color: #800000; background: transparent;">6885</span><span class="pun" style="background: transparent;">)</span><span class="pln" style="background: transparent;"> </span>
<span class="pln" style="background: transparent;">at oracle</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">sysman</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">assistants</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">dbca</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">backend</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">CommandLineArguments</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">process</span><span class="pun" style="background: transparent;">(</span><span class="pln" style="background: transparent;">CommandLineArguments</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">java</span><span class="pun" style="background: transparent;">:</span><span class="lit" style="color: #800000; background: transparent;">4544</span><span class="pun" style="background: transparent;">)</span><span class="pln" style="background: transparent;"> </span>
<span class="pln" style="background: transparent;">at oracle</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">sysman</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">assistants</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">dbca</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">Dbca</span><span class="pun" style="background: transparent;">.</span><span class="kwd" style="color: #00008b; background: transparent;">execute</span><span class="pun" style="background: transparent;">(</span><span class="pln" style="background: transparent;">Dbca</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">java</span><span class="pun" style="background: transparent;">:</span><span class="lit" style="color: #800000; background: transparent;">110</span><span class="pun" style="background: transparent;">)</span><span class="pln" style="background: transparent;"> at oracle</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">sysman</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">assistants</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">dbca</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">Dbca</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">main</span><span class="pun" style="background: transparent;">(</span><span class="pln" style="background: transparent;">Dbca</span><span class="pun" style="background: transparent;">.</span><span class="pln" style="background: transparent;">java</span><span class="pun" style="background: transparent;">:</span><span class="lit" style="color: #800000; background: transparent;">184</span><span class="pun" style="background: transparent;">)</span>

However when I pass exact same parameters as command line arguments, dbca works absolutely fine and PDB is created: Following command runs succefully.

<span class="pln" style="background: transparent;">dbca </span><span class="pun" style="background: transparent;">-</span><span class="pln" style="background: transparent;">silent </span><span class="pun" style="background: transparent;">-</span><span class="pln" style="background: transparent;">createPluggableDatabase </span><span class="pun" style="background: transparent;">-</span><span class="pln" style="background: transparent;">sourceDB orcl </span><span class="pun" style="background: transparent;">-</span><span class="pln" style="background: transparent;">pdbName dev </span><span class="pun" style="background: transparent;">-</span><span class="pln" style="background: transparent;">createPDBFrom </span><span class="kwd" style="color: #00008b; background: transparent;">default</span><span class="pln" style="background: transparent;"> </span><span class="pun" style="background: transparent;">-</span><span class="pln" style="background: transparent;">pdbAdminUserName oracle </span><span class="pun" style="background: transparent;">-</span><span class="pln" style="background: transparent;">pdbAdminPassword oracle </span><span class="pun" style="background: transparent;">-</span><span class="pln" style="background: transparent;">createUserTableSpace true</span>

My environment need installation using response files only. I had used a dbca response file with "createDatabase" option for CDB and it worked fine. Error is observed only when I run it with OPERATION_TYPE as "createPluggableDatabase".

There is an option to create PDBs along with CDB creation when OPERATION_TYPE is "createDatabase". But Oracle does not give flexibility to name PDBs in this option. If I ask Oracle to create 3 PDBs, it will name them itself like PDB01, PDB02, PDB03 and so on. This doesn't work in my deployment because of applications compile time dependencies on specific PDB names.

Answers

  • No access to a 12c instance now.

    Haven't tried response files for PDB creation.

    Are you sure you are pointing to the correct response file? What you posted is still using the default name and you normally copy the template and rename it.

    Have you tried removing the 'silent' and then trying different response files for each of the other parameters? The response file can be used to provide SOME of the parameters so if you remove one or more from the parameter file a 'non silent' mode operation should prompt you for the missing ones.


  • 1041779
    1041779 Member Posts: 2

    Yes, I am pointing to correct response file. I have two of these. One for "createDatabase" and another one for "createPluggableDatabase".

    While the first one works absolutely fine, the one which creates PDBs always gives error.

    I tried renaming the response file like dbca_dev.rsp for PDB install but same error message. I read in another forum that rename dbca.rsp is not a good idea.

    So I kept it as dbca.rsp but built it using PDB template.

    When I try after removing -silent, it tries to launch a UI installer. Since I am in Amazon AWS platform, my instance is CentOS based which doesn't support Xwindows display.

    I am stuck with -silent install only. When I try with -progressOnly, I get exactly same error.

    Also tried removing some parameters but still get exact same error message.

    Tried same trick with "createDatabase" response file, now I see parameters missing error message.

    It seems like Oracle doesn't like response file install for "createPluggableDatabase".

This discussion has been closed.