Changes in DBCA in Oracle 12c
There were some changes in dbca tool in 12c.
Now we can create container and pluggable database with DBCA. You can also create a database without the container by making the createAsContainerDatabase parameter false.
We can specify database opening parameters by specifying name and value with initParams. It should be separated by commas when there is more than one.
You can see all the parameters that can be used with DBCA.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
[oracle@orcldb01 ~]$ dbca -createDatabase -help -createDatabase - Command to Create a database. -responseFile | (-gdbName,-templateName) -responseFile - <Fully qualified path for a response file> -gdbName <Global database name> -templateName <Name of an existing template in default location or the complete template path> [-characterSet <Character set for the database>] [-createAsContainerDatabase <true | false>] [-numberOfPDBs <Number of pluggable databases to be created, default is 0>] [-pdbAdminPassword <PDB Administrator user Password, required only while creating new PDB>] [-pdbName <Pluggable database name>] [-pdbOptions <A comma separated list of name:value pairs with database options to enable/disable. For example JSERVER:true,DV:false>] [-pdbStorageMAXSizeInMB <value>] [-pdbStorageMAXTempSizeInMB <value>] [-useLocalUndoForPDBs <true | false> Specify false to disable local undo tablespace for PDBs.] [-createListener <Create a new listener to register your database. Specify in format, LISTENER_NAME:PORT>] [-customScripts <A comma separated list of SQL scripts which needs to be run post db creation.The scripts are run in order they are listed>] [-databaseConfigType <SINGLE | RAC | RACONENODE>] [-RACOneNodeServiceName <Service name for the service to be created for RAC One Node database. This option is mandatory when the databaseConfigType is RACONENODE>] [-databaseType <MULTIPURPOSE | DATA_WAREHOUSING | OLTP>] [-datafileDestination <Destination directory for all database files>] [-datafileJarLocation <Directory to place the datafiles in compressed format>] [-dbOptions <A comma separated list of name:value pairs with database options to enable/disable. For example JSERVER:true,DV:false>] [-dvConfiguration <true | false> Specify true to configure and enable database vault.] -dvUserName <Specify database vault owner user name> -dvUserPassword <Specify database vault owner password> [-dvAccountManagerName <Specify separate database vault account manager>] [-dvAccountManagerPassword <Specify database vault account manager password>] [-emConfiguration <DBEXPRESS | CENTRAL | BOTH | NONE>] [-dbsnmpPassword <DBSNMP user password>] [-emExpressPort <EM database express port number. Generally used during createDatabase>] [-emPassword <EM Admin user password>] [-emUser <EM Admin username to add or modify targets>] [-omsHost <EM management server host name>] [-omsPort <EM management server port number>] [-enableArchive <true | false> Specify true to enable archive>] [-archiveLogDest <Specify archive log destinations separated by comma. If archive log destination is not specified, fast recovery area location will be used for archive log files.>] [-archiveLogMode <AUTO|MANUAL , the default is Automatic archiving>] [-initParams <Comma separated list of name=value pairs>] [-initParamsEscapeChar <Specify escape character for comma when a specific initParam has multiple values.If the escape character is not specified backslash is the default escape character>] [-listeners <A comma separated list of listeners that the database can be configured with>] [-memoryMgmtType <AUTO|AUTO_SGA|CUSTOM_SGA>] [-memoryPercentage | -totalMemory] [-memoryPercentage <Percentage of physical memory for oracle database>] [-totalMemory <Memory allocated for Oracle in MB>] [-nationalCharacterSet <National character set for the database>] [-nodelist <Node names separated by comma for the database>] [-olsConfiguration <true | false> Specify true to configure and enable Oracle Label Security.] [-configureWithOID This flag configures Oracle Label Security with OID.] [-oracleHomeUserName <Specify Oracle Home User Name>] [-oracleHomeUserPassword <Specify Oracle Home User Password>] [-policyManaged | -adminManaged] [-policyManaged <Policy managed database, default option is Admin managed database>] -serverPoolName <Specify the single server pool name in case of create server pool or comma separated list in case of existing server pools> [-createServerPool <Create a new server pool, which will be used by the database>] [-cardinality <Specify the cardinality of the new server pool that is to be created, default is the number of qualified nodes>] [-force <To create server pool by force when adequate free servers are not available. This may affect the database which is already in running mode>] [-pqCardinality <value>] [-pqPoolName <value>] [-pqPoolName <value>] [-adminManaged <Admin managed database, this is default option>] [-recoveryAreaDestination <Destination directory for all recovery files. Specify "NONE" for disabling Fast Recovery Area>] [-recoveryAreaSize <Fast Recovery Area Size in MB>] [-redoLogFileSize <Size of each redo log file in MB>] [-registerWithDirService <true | false>] -dirServiceUserName <User name for directory service> [-databaseCN <Database common name>] [-dirServicePassword <Password for directory service>] [-walletPassword <Password for database wallet>] [-runCVUChecks <Specify "true" in order to run Cluster Verification Utility checks periodically for RAC databases.>] [-sampleSchema <true | false>] [-sid <Database system identifier>] [-storageType < FS | ASM >] -datafileDestination <Destination directory for all database files> [-asmsnmpPassword <ASMSNMP password for ASM monitoring>] [-sysPassword <SYS user password>] [-systemPassword <SYSTEM user password>] [-useOMF <true | false> Specify true to use Oracle-Managed Files.] [-useWalletForDBCredentials <true | false> Specify true to load database credentials from wallet] -dbCredentialsWalletLocation <Path of the directory containing the wallet files> [-dbCredentialsWalletPassword <Password to open wallet with auto login disabled>] [-variables <Comma separated list of name=value pairs>] [-variablesFile <File name of the variable-value pair for variables in the template>] |
Create a Non-Container Database in DBCA Silent Mode
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
dbca -silent \ -createDatabase \ -createAsContainerDatabase false \ -nodelist orcldb01,orcldb02 \ -templateName General_Purpose.dbc \ -gdbName TEST \ -sid TEST \ -SysPassword welcome1 \ -SystemPassword welcome1 \ -emConfiguration none \ -redoLogFileSize 1024 \ -recoveryAreaDestination +RECO \ -storageType ASM \ -asmsnmpPassword welcome1 \ -asmSysPassword welcome1 \ -diskGroupName DATA \ -recoveryGroupName RECO \ -datafileDestination DATA \ -listeners LISTENER \ -registerWithDirService false \ -characterSet AL32UTF8 \ -nationalCharacterSet AL16UTF16 \ -databaseType MULTIPURPOSE \ -memoryMgmtType AUTO_SGA \ -totalMemory 10240 \ -sampleSchema false \ -initParams \ name='audit_file_dest' value='/u01/app/oracle/admin/TEST/adump', \ name='compatible' value='12.2.0.0.0', \ name='db_create_file_dest' value='+DATA_EXA', \ name='db_recovery_file_dest_size' value=5048893440, \ name='db_create_online_log_dest_1' value='+DATA', \ name='db_create_online_log_dest_2' value='+RECO', \ name='db_recovery_file_dest' value='+RECO', \ name='diagnostic_dest' value='/u01/app/oracle', \ name='parallel_max_servers' value=8, \ name='session_cached_cursors' value=100, \ name='processes' value=500, \ name='db_files' value=600, \ name='open_cursors' value=800 |
Create a Container Database in DBCA Silent Mode
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
dbca -silent \ -createDatabase \ -createAsContainerDatabase true \ -numberOfPDBs 2 \ -pdbAdminPassword welcome1 \ -pdbName PDB1 \ -nodelist orcldb01,orcldb02 \ -templateName General_Purpose.dbc \ -gdbName TEST \ -sid TEST \ -SysPassword welcome1 \ -SystemPassword welcome1 \ -emConfiguration none \ -redoLogFileSize 1024 \ -recoveryAreaDestination +RECO \ -storageType ASM \ -asmsnmpPassword welcome1 \ -asmSysPassword welcome1 \ -diskGroupName DATA \ -recoveryGroupName RECO \ -datafileDestination DATA \ -listeners LISTENER \ -registerWithDirService false \ -characterSet AL32UTF8 \ -nationalCharacterSet AL16UTF16 \ -databaseType MULTIPURPOSE \ -memoryMgmtType AUTO_SGA \ -totalMemory 10240 \ -sampleSchema false \ -initParams \ name='audit_file_dest' value='/u01/app/oracle/admin/TEST/adump', \ name='compatible' value='12.2.0.0.0', \ name='db_create_file_dest' value='+DATA', \ name='db_recovery_file_dest_size' value=5048893440, \ name='db_create_online_log_dest_1' value='+DATA', \ name='db_create_online_log_dest_2' value='+RECO', \ name='db_recovery_file_dest' value='+RECO', \ name='diagnostic_dest' value='/u01/app/oracle', \ name='parallel_max_servers' value=8, \ name='session_cached_cursors' value=100, \ name='processes' value=500, \ name='db_files' value=600, \ name='open_cursors' value=800 |
Note: When specifying fra with recoverareadestination, you must type “+” at the beginning, as follows.
1 |
+GROUP_NAME |
The value you set for the db_recovery_file_dest_size parameter must be in bytes.
If your database is 11g, you may want to read the below article.
“How To Create Oracle RAC Database Using DBCA(Database Configuration Assistant) Silent Mode”