En este sencillo ejemplo creé el archivo testdb.dbt copiando uno de los archivos template que se encuentran en el directorio $ORACLE_HOME/assistants/dbca/templates/. Luego modifiqué este archivo colocando algunas configuraciones para la nueva base de datos que quiero crear. Por último, ejecuté el siguiente comando ...
$ dbca -Silent -CreateDatabase -gdbName testdb -sid testdb -templateName $ORACLE_HOME/assistants/dbca/templates/testdb.dbt -sysPassword oracle -systemPassword oracle -dbsnmpPassword oracle -sysmanPassword oracle
4% complete
Creating and starting Oracle instance
5% complete
6% complete
7% complete
12% complete
Creating database files
20% complete
Creating data dictionary views
22% complete
24% complete
27% complete
28% complete
29% complete
30% complete
31% complete
32% complete
33% complete
34% complete
39% complete
41% complete
44% complete
46% complete
Adding Oracle Application Express
47% complete
48% complete
49% complete
50% complete
51% complete
52% complete
53% complete
54% complete
55% complete
56% complete
57% complete
58% complete
59% complete
60% complete
62% complete
Adding Oracle Warehouse Builder
63% complete
64% complete
65% complete
66% complete
67% complete
75% complete
78% complete
Completing Database Creation
80% complete
83% complete
85% complete
92% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/soldb/testdb.log" for further details.
Existen muchos parámetros opcionales con los que podemos ejecutar el DBCA para crear una base de datos. También, podemos ejecutar DBCA para realizar otras operaciones por linea de comando; como borrar una base de datos, crear scripts, etc.
Podemos ver todas las operaciones que se pueden ejecutar con el comando DBCA -H ...
$ dbca -h
dbca [-silent | -progressOnly | -customCreate] { } | { [ [options] ] -responseFile } [-continueOnNonFatalErrors ]
Please refer to the manual for details.
You can enter one of the following command:
Create a database by specifying the following parameters:
-createDatabase
-templateName
[-cloneTemplate]
-gdbName
[-policyManaged | -adminManaged ]
[-createServerPool ]
[-force ]
-serverPoolName
-[cardinality ]
[-sid ]
[-sysPassword ]
[-systemPassword ]
[-emConfiguration
-dbsnmpPassword
-sysmanPassword
[-hostUserName
-hostUserPassword
-backupSchedule ]
[-smtpServer
-emailAddress ]
[-centralAgent ]]
[-disableSecurityConfiguration
[-datafileDestination | -datafileNames ]
[-redoLogFileSize ]
[-recoveryAreaDestination ]
[-datafileJarLocation ]
[-storageType < CFS | ASM >
[-asmsnmpPassword ]
-diskGroupName
-recoveryGroupName
[-nodelist ]
[-characterSet ]
[-nationalCharacterSet ]
[-registerWithDirService
-dirServiceUserName
-dirServicePassword
-walletPassword ]
[-listeners ]
[-variablesFile ]]
[-variables ]
[-initParams ]
[-memoryPercentage ]
[-automaticMemoryManagement ]
[-totalMemory ]
[-databaseType ]]
Configure a database by specifying the following parameters:
-configureDatabase
-sourceDB
[-sysDBAUserName
-sysDBAPassword ]
[-registerWithDirService|-unregisterWithDirService|-regenerateDBPassword
-dirServiceUserName
-dirServicePassword
-walletPassword ]
[-disableSecurityConfiguration
[-enableSecurityConfiguration
[-emConfiguration
-dbsnmpPassword
-symanPassword
[-hostUserName
-hostUserPassword
-backupSchedule ]
[-smtpServer
-emailAddress ]
[-centralAgent ]]
Create a template from an existing database by specifying the following parameters:
-createTemplateFromDB
-sourceDB ::>
-templateName
-sysDBAUserName
-sysDBAPassword
[-maintainFileLocations ]
Create a clone template from an existing database by specifying the following parameters:
-createCloneTemplate
-sourceSID
-templateName
[-sysDBAUserName
-sysDBAPassword ]
[-maintainFileLocations ]
[-datafileJarLocation ]
Generate scripts to create database by specifying the following parameters:
-generateScripts
-templateName
-gdbName
[-scriptDest ]
Delete a database by specifying the following parameters:
-deleteDatabase
-sourceDB