dbca templates and issues
dbca -silent -responseFile /home/oracle/rsp.rsp INSTALL_TYPE=”EE” n_configurationOption=3 -ignoreSysPrereqs
DB
==
dbca -silent -createDatabase -gdbname imas -sid imas -responseFile file_name
PROBLEMS BECAUSE DBCA not recognising ASM from template:
dbca -silent -createDatabase -gdbname imas -templateName file_name -SysPassword test -SystemPassword test -storageType ASM -asmSysPassword test
To use DBCA in silent mode and you want the database stored in the ASM +DGDATA diskgroup follow the next Correct Format for Examples:
If I already have an ASM instance/diskgroup then the following creates a single database on that diskgroup:
$ dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName ORCL -sid ORCL -SysPassword change_on_install -SystemPassword manager -emConfiguration NONE -storageType ASM -asmSysPassword change_on_install -diskGroupName DGDATA -characterSet WE8ISO8859P15 -memoryPercentage 40
$ dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName ORCL -sid ORCL -SysPassword change_on_install -SystemPassword manager -emConfiguration NONE -storageType ASM -asmSysPassword change_on_install -diskGroupName DGDATA -characterSet WE8ISO8859P15 -memoryPercentage 40
11gR1 :
Windows :Â
> cd Z:\database
> setup.exe -silent -force -debug FROM_LOCATION="Z:\database\stage\products.xml" ORACLE_HOME="D:\app\oracle\product\11.1.0\db_1" ORACLE_HOME_NAME="Ora11gDb1" ORACLE_BASE="D:\app\oracle" TOPLEVEL_COMPONENT={"oracle.server","11.1.0.6.0"} INSTALL_TYPE="EE" n_configurationOption=3
Unix:
$ cd /mount/dvd/database
$ ./runInstaller -silent -force -debug \
FROM_LOCATION="/mount/dvd/database/stage/products.xml" \
ORACLE_HOME="/u01/app/oracle/product/11.1.0/db_1" \
ORACLE_HOME_NAME="Ora11gDb1"Â ORACLE_BASE="/u01/app/oracle" \
TOPLEVEL_COMPONENT='{"oracle.server","11.1.0.6.0"}' \
INSTALL_TYPE="EE"Â n_configurationOption=3
10gR2 :
Windows :
>Â cd Y:\database
> setup.exe -silent -force -debug FROM_LOCATION="Z:\database\stage\products.xml" ORACLE_HOME="D:\app\oracle\product\10.2.0\db_1" ORACLE_HOME_NAME="Ora10gDb1" TOPLEVEL_COMPONENT={"oracle.server","10.2.0.1.0"} INSTALL_TYPE="EE" n_configurationOption=3
Unix:
$ cd /mount/dvd/database
$ ./runInstaller -silent -force -debug \
FROM_LOCATION="/mount/dvd/database/stage/products.xml" \
ORACLE_HOME="/u01/app/oracle/product/10.2.0/db_1" \
ORACLE_HOME_NAME="Ora10gDb1" \
TOPLEVEL_COMPONENT='{"oracle.server","10.2.0.1.0"}' \
INSTALL_TYPE="EE"Â n_configurationOption=3
Following command can be used to deinstall Database Server Software in silent mode. Example is given for 10gR2 (10.2.0.1).
Windows:
> setup.exe -silent -debug -deinstall DEINSTALL_LIST={"oracle.server","10.2.0.1.0"} REMOVE_HOMES={"D:\app\oracle\product\10.2.0\db_1"}
Unix:
$ ./runInstaller -silent -debug -deinstall \
DEINSTALL_LIST='{"oracle.server","10.2.0.1.0"}' \
REMOVE_HOMES={"/u01/app/oracle/product/10.2.0/db_1"}
=====================================================================================
PURPOSE
——-
This bulletin lists different issues that may occur when trying to:
  * Create a database from a non-seed template (from scratch)
  * Create a non-seed template from an existing database
using the Database Configuration Assistant (DBCA)in silent mode.
To understand the definition of seed and non-seed templates provided by the
DBCA, please refer to:
   Note 148676.1 DBCA Templates
SCOPE & APPLICATION
——————-
List of possible errors and solutions.
Issues Running DBCA in Silent Mode:
===================================
Case 1
——
$ dbca -silent -createDatabase -gdbname ora9i -templateName /ora901/assistants/dbca/templates/New_Database.dbt
Look at the log file “/ora901/assistants/dbca/logs/10.log” for further details.
$ more /ora901/assistants/dbca/logs/10.log
Template /ora901/assistants/dbca/templates/New_Database.dbt does not exist
. Please specify an existing template for database creation.
$
The error occurs although /ora901/assistants/dbca/templates/New_Database.dbt
exists.
  => do not use the full path name of the template
$ dbca -silent -createDatabase -gdbname ora9i -templateName New_Database.dbt
Case 2
——
$ dbca -silent -createDatabase -gdbname ora9i -templateName New_Database.dbt
Look at the log file “/ora/ora901/assistants/dbca/logs/ora9i.log” for further
details.
$ more /ora/ora901/assistants/dbca/logs/ora9i.log
The Oracle system identifier(SID) “ora9i” already exists. Specify another SID.
$
 => you have to change the ORACLE_SID environment variable, because this
    database already exists.
Case 3
——
$ dbca -silent -createDatabase -gdbname ora9i -templateName New_Database.dbt
Look at the log file “/ora/ora901/assistants/dbca/logs/ora9i.log” for further
details.
$ more /ora/ora901/assistants/dbca/logs/ora9i.log
You do not have enough free disk space to create the database.
You need at least 998400 KB on /ora/, You have only 405504 KB available.
Do you want to continue?
$
  => edit the New_Database.dbt template to decrease the size for all datafiles
     and redo log files
  => Example:
          Â
    Â
        DRSYS
        false
        true
        0
        20480  =====> change 20480 to 2048
        true
        true
        640
        -1
     Â
     and so on for the other tablespaces
Case 4
——
$ dbca -silent -createDatabase -gdbname ora9i -templateName New_Database.dbt
java.lang.NullPointerException
       at oracle.sysman.assistants.dbca.backend.template.ParseManager.endElement(Compiled Code)
       at oracle.xml.parser.v2.DefaultXMLDocumentHandler.endElement(Compiled Code)
       at oracle.xml.parser.v2.NonValidatingParser.parseElement(Compiled Code)
       at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:270)
       at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:235)
       at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:221)
       at oracle.sysman.assistants.dbca.backend.TemplateManager.parseTemplate(TemplateManager.java:1044)
       at oracle.sysman.assistants.dbca.backend.TemplateManager.loadTemplate(TemplateManager.java:398)
       at oracle.sysman.assistants.dbca.backend.TemplateManager.loadCurrentTemplate(TemplateManager.java:423)
       at oracle.sysman.assistants.dbca.backend.Host.startOperation(Compiled Code)
       at oracle.sysman.assistants.dbca.Dbca.execute(Dbca.java:94)
       at oracle.sysman.assistants.dbca.Dbca.main(Dbca.java:143)
$
Whenever the path given in a variable in the template file does not exist, the
java.lang.NullPointerException error will occur.
  => Edit and change all path names for control, redo log, data, and dump
     files in the template.
Case 5
——
$ dbca -silent -createDatabase -gdbname ora9i -templateName New_Database.dbt
oracle.xml.parser.v2.XMLParseException: ‘>’ Missing from end tag.
       at oracle.xml.parser.v2.XMLError.flushErrors(XMLError.java:240)
       at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:244)
       at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:221)
       at oracle.sysman.assistants.dbca.backend.TemplateManager.parseTemplate(TemplateManager.java:1044)
       at oracle.sysman.assistants.dbca.backend.TemplateManager.loadTemplate(TemplateManager.java:398)
       at oracle.sysman.assistants.dbca.backend.TemplateManager.loadCurrentTemplate(TemplateManager.java:423)
       at oracle.sysman.assistants.dbca.backend.Host.startOperation(Compiled Code)
       at oracle.sysman.assistants.dbca.Dbca.execute(Dbca.java:94)
       at oracle.sysman.assistants.dbca.Dbca.main(Dbca.java:143)
Look at the log file “/ora/ora901/assistants/dbca/logs/ora9i1.log” for further
details.
$
$ more /ora/ora901/assistants/dbca/logs/ora9i1.log
A java pool size of at least 50MB is required for Oracle JVM.
Set “java_pool_size” initialization parameter to at least 50MB.
$
  => Edit and modify the template to set JAVA_POOL_SIZE to the appropriate
     value
  => Example:  Â
              changed to
Case 6
——
$ dbca -silent -createDatabase -gdbname ora9i -templateName New_Database.dbt
oracle.xml.parser.v2.XMLParseException: ‘>’ Missing from end tag.
       at oracle.xml.parser.v2.XMLError.flushErrors(XMLError.java:240)
       at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:244)
       at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:221)
       at oracle.sysman.assistants.dbca.backend.TemplateManager.parseTemplate(TemplateManager.java:1044)
       at oracle.sysman.assistants.dbca.backend.TemplateManager.loadTemplate(TemplateManager.java:398)
       at oracle.sysman.assistants.dbca.backend.TemplateManager.loadCurrentTemplate(TemplateManager.java:423)
       at oracle.sysman.assistants.dbca.backend.Host.startOperation(Compiled Code)
       at oracle.sysman.assistants.dbca.Dbca.execute(Dbca.java:94)
       at oracle.sysman.assistants.dbca.Dbca.main(Dbca.java:143)
Look at the log file “/ora/ora901/admin/ora9i/create/ora9i.log” for further
details.
$
When the directory $ORACLE_HOME or $ORACLE_BASE/admin/ora9i/create is created,
this means that at least the instance is started and the mount phase of the
database creation process is started.
$ more /ora/ora901/admin/ora9i/create/ora9i.log
ORA-02236: invalid file name
ORA-02236: invalid file name
$
  => Read other files created in /ora/ora901/admin/ora9i/create directory
  => Read the alert.log file of the started instance
This helps to identify which step the database creation is currently at.
$ ls -l
total 4
-rw-rw-r–  1 ora901    dba           270 Nov 15 14:47 CreateDB.log
-rw-rw-r–  1 ora901    dba            58 Nov 15 14:47 ora9i.log
$ more CreateDB.log
ORACLE instance started.
Total System Global Area 235851200 bytes
Fixed Size                  437696 bytes
Variable Size            167772160 bytes
Database Buffers          67108864 bytes
Redo Buffers                532480 bytes
CHARACTER SET US7ASCII
*
ERROR at line 8:
ORA-02236: invalid file name
or
$ more CreateDB.log
LRM-00116: syntax error at ‘protocol’ following ‘(‘
ORA-01078: failure in processing system parameters
Case 7
——
$ dbca -silent -createTemplateFromDB -sourceDB V901 \
>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â -sysDBAUserName sys \
>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â -sysDBAPassword manager \
>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â -templateName copy_of_ora901.dbc
Look at the log file “/ora/ora901/assistants/dbca/logs/11.log” for further
details.
$
$ more /ora/ora901/assistants/dbca/logs/11.log
VDB-2000 : Service alias could not be resolved.
  => Use the full descriptor of the service name :
$ dbca -silent -createTemplateFromDB -sourceDB frhp11:1521:V901 \
>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â -sysDBAUserName sys \
>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â -sysDBAPassword manager \
>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â -templateName copy_of_ora901.dbc
Case 8
——
$ dbca -silent -createTemplateFromDB -sourceDB frhp11:1521:V901 \
>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â -sysDBAUserName sys \
>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â -sysDBAPassword manager \
>Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â -templateName copy_of_ora901.dbc
Look at the log file “/ora/ora901/assistants/dbca/logs/12.log” for further
details.
$ more /ora/ora901/assistants/dbca/logs/12.log
ORA-01017: invalid username/password; logon denied
  => use a username/password able to connect to the source database AS SYSBDA
$ dbca -silent -createTemplateFromDB \
                      -sourceDB frhp11:1521:V901 \
                      -sysDBAUserName system -sysDBAPassword manager \
                      -templateName copy_of_ora901
Look at the log file “/ora/ora901/assistants/dbca/logs/13.log” for further
details.
$ more /ora/ora901/assistants/dbca/logs/13.log
The template “copy_of_ora901.dbc” creation completed.
References:
———–
 Note 159324.1 ORA-1092 Instance Terminated When Creating A Database Via DBCA
 Note 148676.1 DBCA Templates
======================================================================================
Â
Discussion ¬