{"id":155,"date":"2017-04-25T21:01:57","date_gmt":"2017-04-25T21:01:57","guid":{"rendered":"https:\/\/www.spotonoracle.com\/?p=155"},"modified":"2017-04-26T13:42:18","modified_gmt":"2017-04-26T13:42:18","slug":"sh-silent-installation-dbca","status":"publish","type":"post","link":"https:\/\/www.spotonoracle.com\/?p=155","title":{"rendered":"Sh! &#8211; silent installation (DBCA)"},"content":{"rendered":"<p>I&#8217;ve been playing with Oracle 12.2 lately, which also means I do lots of silent installations of it :-).<br \/>\nI don&#8217;t know why I just put a smiley there because there was nothing funny about it! Troubleshooting DBCA errors, combing through logs, and raising service requests with Oracle Support almost sucked the joy out of the new 12.2 release.<\/p>\n<p>That&#8217;s what I&#8217;ve stumbled upon:<\/p>\n<ul>\n<li>DBCA parameter &quot;-variables&quot; is not processed correctly. Oracle has acknowledge this as bug 25353173. Workaround: put name=value list in a file and use &quot;-variablesFile &lt;path-to-file&gt;&quot;<\/li>\n<li>Controlfiles are not multiplexed to different paths as specified. First given path is used for all controlfile members (SR is &quot;Work In Progress&quot;) <\/li>\n<li>Specifying &lt;initParam name=&quot;os_authent_prefix&quot; value=&quot;&quot;\/&gt; results in parameter to be set to &quot;ops$&quot;. In 12.2 you have to specify the single quotes &#39;&#39; like this: &lt;initParam name=&quot;os_authent_prefix&quot; value=&quot;<strong>&#39;&#39;<\/strong>&quot;\/&gt;. If you want an empty value for a parameter you better set it in &#39;&#39;. (*)<\/li>\n<li>Maybe not a bug but still annoying: specify DB_UNIQUE_NAME different from DB_NAME and your file paths will be appended with it.<\/li>\n<\/ul>\n<p>* actually, the new way makes more sense to me as it is closer to the way you set empty values in ALTER SYSTEM\/SESSION SET statement.<\/p>\n<p>Anyway, enough with the rambling. I will show now how I setup my lab systems.<\/p>\n<p>To be flexible with automation we set a few variables that are later used to feed input to DBCA. You can modify these according to your needs and environment.<\/p>\n<pre class=\"brush: bash; collapse: false; title: ; wrap-lines: false; notranslate\" title=\"\">\r\nNEW_ORACLE_SID=DEV1\r\nNEW_DB_NAME=DEV1\r\nNEW_DB_DOMAIN=localdomain\r\nNEW_DB_CHARSET=AL32UTF8\r\nNEW_SYS_PWD=manager\r\nNEW_SYSTEM_PWD=manager\r\nNEW_REDO_SIZE_MB=256\r\n\r\nINIT_CMPA=DIAGNOSTIC+TUNING\r\nINIT_COMPATIBLE=12.2.0.0\r\nINIT_OFE=12.2.0.1\r\nINIT_PGA_AGG_TGT_MB=512\r\nINIT_PROCESSES=200\r\nINIT_SGA_TGT_MB=4096\r\nINIT_CPU_COUNT=4\r\n\r\nNEW_DATA_PATH1=\/u02\/oradata\/${NEW_DB_NAME}\r\nNEW_REDO_PATH1=\/u02\/oradata\/${NEW_DB_NAME}\r\nNEW_REDO_PATH2=\/u03\/oradata\/${NEW_DB_NAME}\r\nNEW_ARCH_PATH1=\/u04\/oradata\/${NEW_DB_NAME}\r\n<\/pre>\n<p>NEW_REDO_PATH1 and NEW_REDO_PATH2 will be used for multiplexing online redo-logs as well as controlfiles. The rest of the variables should be self-explanatory.<\/p>\n<p>You don&#8217;t have to modify following variables as they are &#8220;calculated&#8221; values.<\/p>\n<pre class=\"brush: bash; collapse: false; title: ; wrap-lines: false; notranslate\" title=\"\">\r\nNEW_DB_UNIQUE_NAME=${NEW_DB_NAME}\r\nNEW_GLOBAL_DBNAME=${NEW_DB_NAME}.${NEW_DB_DOMAIN}\r\nINIT_PGA_AGG_TGT=$((${INIT_PGA_AGG_TGT_MB} * 1024 * 1024))\r\nINIT_SGA_TGT=$((${INIT_SGA_TGT_MB} * 1024 * 1024))\r\nINIT_LISTENER_REG=LISTENER_${NEW_DB_NAME}\r\n<\/pre>\n<p>Just make sure you have a listener running with the name specified in INIT_LISTENER_REG.<\/p>\n<p>Now, because of bug 25353173 we must put what we&#8217;d normally feed to &quot;-variables&quot; into a file:<\/p>\n<pre class=\"brush: bash; collapse: false; title: ; wrap-lines: false; notranslate\" title=\"\">\r\necho &quot;DATA_PATH1=${NEW_DATA_PATH1}&quot; &gt;  \/tmp\/dbca-vars.txt\r\necho &quot;REDO_PATH1=${NEW_REDO_PATH1}&quot; &gt;&gt; \/tmp\/dbca-vars.txt\r\necho &quot;REDO_PATH2=${NEW_REDO_PATH2}&quot; &gt;&gt; \/tmp\/dbca-vars.txt\r\necho &quot;ARCH_PATH1=${NEW_ARCH_PATH1}&quot; &gt;&gt; \/tmp\/dbca-vars.txt\r\n<\/pre>\n<p>Before we can run DBCA we need to prepare a template. I like to prepare a template that contains placeholders and everything else that I define static. This way I define one single template and can reuse it for all kinds of deployments.<br \/>\nI know it&#8217;s awfully long but you can skip reading the template if you just want to go ahead and create the database.<br \/>\nSave this as \/tmp\/dbca-newdb-linux.dbt<\/p>\n<pre class=\"brush: bash; collapse: false; title: ; wrap-lines: false; notranslate\" title=\"\">\r\n&lt;DatabaseTemplate name=&quot;New Database&quot; description=&quot;&quot; version=&quot;12.2.0.1.0&quot;&gt;\r\n   &lt;CommonAttributes&gt;\r\n      &lt;option name=&quot;OMS&quot; value=&quot;false&quot;\/&gt;\r\n      &lt;option name=&quot;JSERVER&quot; value=&quot;false&quot;\/&gt;\r\n      &lt;option name=&quot;SPATIAL&quot; value=&quot;false&quot;\/&gt;\r\n      &lt;option name=&quot;IMEDIA&quot; value=&quot;false&quot;\/&gt;\r\n      &lt;option name=&quot;ORACLE_TEXT&quot; value=&quot;false&quot;&gt;\r\n         &lt;tablespace id=&quot;SYSAUX&quot;\/&gt;\r\n      &lt;\/option&gt;\r\n      &lt;option name=&quot;CWMLITE&quot; value=&quot;false&quot;&gt;\r\n         &lt;tablespace id=&quot;SYSAUX&quot;\/&gt;\r\n      &lt;\/option&gt;\r\n      &lt;option name=&quot;SAMPLE_SCHEMA&quot; value=&quot;false&quot;\/&gt;\r\n      &lt;option name=&quot;APEX&quot; value=&quot;false&quot;\/&gt;\r\n      &lt;option name=&quot;DV&quot; value=&quot;false&quot;\/&gt;\r\n   &lt;\/CommonAttributes&gt;\r\n   &lt;Variables\/&gt;\r\n   &lt;CustomScripts Execute=&quot;false&quot;\/&gt;\r\n   &lt;InitParamAttributes&gt;\r\n      &lt;InitParams&gt;\r\n         &lt;initParam name=&quot;autotask_max_active_pdbs&quot; value=&quot;1&quot;\/&gt;\r\n         &lt;initParam name=&quot;awr_pdb_autoflush_enabled&quot; value=&quot;true&quot;\/&gt;\r\n         &lt;initParam name=&quot;awr_snapshot_time_offset&quot; value=&quot;1000000&quot;\/&gt;\r\n         &lt;initParam name=&quot;commit_logging&quot; value=&quot;IMMEDIATE&quot;\/&gt;\r\n         &lt;initParam name=&quot;commit_wait&quot; value=&quot;WAIT&quot;\/&gt;\r\n         &lt;initParam name=&quot;containers_parallel_degree&quot; value=&quot;2&quot;\/&gt;\r\n         &lt;initParam name=&quot;control_files&quot; value=&quot;(&amp;quot;{DATA_PATH1}\/ctrl-001-{DB_NAME}.dbf&amp;quot;, &amp;quot;{REDO_PATH1}\/ctrl-002-{DB_NAME}.dbf&amp;quot;, &amp;quot;{REDO_PATH2}\/ctrl-003-{DB_NAME}.dbf&amp;quot;)&quot;\/&gt;\r\n         &lt;initParam name=&quot;control_file_record_keep_time&quot; value=&quot;35&quot;\/&gt;\r\n         &lt;initParam name=&quot;cursor_invalidation&quot; value=&quot;DEFERRED&quot;\/&gt;\r\n         &lt;initParam name=&quot;db_block_checking&quot; value=&quot;MEDIUM&quot;\/&gt;\r\n         &lt;initParam name=&quot;db_block_checksum&quot; value=&quot;FULL&quot;\/&gt;\r\n         &lt;initParam name=&quot;db_block_size&quot; value=&quot;8&quot; unit=&quot;KB&quot;\/&gt;\r\n         &lt;initParam name=&quot;db_files&quot; value=&quot;100&quot;\/&gt;\r\n         &lt;initParam name=&quot;db_flashback_retention_target&quot; value=&quot;1440&quot;\/&gt;  \r\n         &lt;initParam name=&quot;db_securefile&quot; value=&quot;ALWAYS&quot;\/&gt;\r\n         &lt;initParam name=&quot;deferred_segment_creation&quot; value=&quot;FALSE&quot;\/&gt;\r\n         &lt;initParam name=&quot;dg_broker_config_file1&quot; value=&quot;{ORACLE_BASE}\/admin\/{DB_NAME}\/instance\/dr-001-{DB_NAME}.dat&quot;\/&gt;\r\n         &lt;initParam name=&quot;dg_broker_config_file2&quot; value=&quot;{ORACLE_BASE}\/admin\/{DB_NAME}\/instance\/dr-002-{DB_NAME}.dat&quot;\/&gt;\r\n         &lt;initParam name=&quot;diagnostic_dest&quot; value=&quot;{ORACLE_BASE}\/adr&quot;\/&gt;\r\n         &lt;initParam name=&quot;dispatchers&quot; value=&quot;''&quot;\/&gt;\r\n         &lt;initParam name=&quot;enable_pluggable_database&quot; value=&quot;TRUE&quot;\/&gt;\r\n         &lt;initParam name=&quot;filesystemio_options&quot; value=&quot;SETALL&quot;\/&gt;\r\n         &lt;initParam name=&quot;inmemory_adg_enabled&quot; value=&quot;FALSE&quot;\/&gt;\r\n         &lt;initParam name=&quot;inmemory_force&quot; value=&quot;OFF&quot;\/&gt;\r\n         &lt;initParam name=&quot;inmemory_query&quot; value=&quot;DISABLE&quot;\/&gt;\r\n         &lt;initParam name=&quot;inmemory_size&quot; value=&quot;0&quot;\/&gt;\r\n         &lt;initParam name=&quot;log_archive_dest_1&quot; value=&quot;LOCATION={ARCH_PATH1}&quot;\/&gt;\r\n         &lt;initParam name=&quot;log_archive_dest_state_1&quot; value=&quot;ENABLE&quot;\/&gt;\r\n         &lt;initParam name=&quot;log_archive_format&quot; value=&quot;{DB_NAME}-%t-%s-%r.arc&quot;\/&gt;\r\n         &lt;initParam name=&quot;max_pdbs&quot; value=&quot;1&quot;\/&gt;\r\n         &lt;initParam name=&quot;nls_language&quot; value=&quot;AMERICAN&quot;\/&gt;\r\n         &lt;initParam name=&quot;nls_nchar_conv_excp&quot; value=&quot;TRUE&quot;\/&gt;\r\n         &lt;initParam name=&quot;nls_territory&quot; value=&quot;AMERICA&quot;\/&gt;\r\n         &lt;initParam name=&quot;open_cursors&quot; value=&quot;300&quot;\/&gt;\r\n         &lt;initParam name=&quot;os_authent_prefix&quot; value=&quot;''&quot;\/&gt;\r\n         &lt;initParam name=&quot;parallel_min_servers&quot; value=&quot;0&quot;\/&gt;\r\n         &lt;initParam name=&quot;remote_listener&quot; value=&quot;''&quot;\/&gt;\r\n         &lt;initParam name=&quot;shared_servers&quot; value=&quot;0&quot;\/&gt;\r\n         &lt;initParam name=&quot;temp_undo_enabled&quot; value=&quot;TRUE&quot;\/&gt;\r\n         &lt;initParam name=&quot;undo_retention&quot; value=&quot;1800&quot;\/&gt;\r\n         &lt;initParam name=&quot;undo_tablespace&quot; value=&quot;UNDOTS&quot;\/&gt;\r\n         &lt;initParam name=&quot;uniform_log_timestamp_format&quot; value=&quot;TRUE&quot;\/&gt;\r\n      &lt;\/InitParams&gt;\r\n      &lt;MiscParams&gt;\r\n         &lt;databaseType&gt;MULTIPURPOSE&lt;\/databaseType&gt;\r\n         &lt;maxUserConn&gt;20&lt;\/maxUserConn&gt;\r\n         &lt;percentageMemTOSGA&gt;40&lt;\/percentageMemTOSGA&gt;\r\n         &lt;archiveLogMode&gt;true&lt;\/archiveLogMode&gt;\r\n         &lt;initParamFileName&gt;{ORACLE_BASE}\/admin\/{DB_NAME}\/create\/init.ora&lt;\/initParamFileName&gt;\r\n      &lt;\/MiscParams&gt;\r\n      &lt;SPfile useSPFile=&quot;true&quot;&gt;{ORACLE_BASE}\/admin\/{DB_NAME}\/instance\/spfile{SID}.ora&lt;\/SPfile&gt;\r\n   &lt;\/InitParamAttributes&gt;\r\n   &lt;StorageAttributes&gt;\r\n      &lt;ControlfileAttributes id=&quot;Controlfile&quot;&gt;\r\n         &lt;maxDatafiles&gt;100&lt;\/maxDatafiles&gt;\r\n         &lt;maxLogfiles&gt;16&lt;\/maxLogfiles&gt;\r\n         &lt;maxLogMembers&gt;3&lt;\/maxLogMembers&gt;\r\n         &lt;maxLogHistory&gt;1&lt;\/maxLogHistory&gt;\r\n         &lt;maxInstances&gt;8&lt;\/maxInstances&gt;\r\n         &lt;image name=&quot;ctrl-001-{DB_NAME}.dbf&quot; filepath=&quot;{DATA_PATH1}\/&quot;\/&gt;\r\n         &lt;image name=&quot;ctrl-002-{DB_NAME}.dbf&quot; filepath=&quot;{REDO_PATH1}\/&quot;\/&gt;\r\n         &lt;image name=&quot;ctrl-003-{DB_NAME}.dbf&quot; filepath=&quot;{REDO_PATH2}\/&quot;\/&gt;\r\n      &lt;\/ControlfileAttributes&gt;\r\n      &lt;DatafileAttributes id=&quot;{DATA_PATH1}\/sysaux-001-{DB_NAME}.dbf&quot;&gt;\r\n         &lt;tablespace&gt;SYSAUX&lt;\/tablespace&gt;\r\n         &lt;temporary&gt;false&lt;\/temporary&gt;\r\n         &lt;online&gt;true&lt;\/online&gt;\r\n         &lt;status&gt;0&lt;\/status&gt;\r\n         &lt;size unit=&quot;MB&quot;&gt;256&lt;\/size&gt;\r\n         &lt;reuse&gt;true&lt;\/reuse&gt;\r\n         &lt;autoExtend&gt;true&lt;\/autoExtend&gt;\r\n         &lt;increment unit=&quot;KB&quot;&gt;8192&lt;\/increment&gt;\r\n         &lt;maxSize unit=&quot;MB&quot;&gt;4096&lt;\/maxSize&gt;\r\n      &lt;\/DatafileAttributes&gt;\r\n      &lt;DatafileAttributes id=&quot;{DATA_PATH1}\/toolts-001-{DB_NAME}.dbf&quot;&gt;\r\n         &lt;tablespace&gt;TOOLTS&lt;\/tablespace&gt;\r\n         &lt;temporary&gt;false&lt;\/temporary&gt;\r\n         &lt;online&gt;true&lt;\/online&gt;\r\n         &lt;status&gt;0&lt;\/status&gt;\r\n         &lt;size unit=&quot;MB&quot;&gt;56&lt;\/size&gt;\r\n         &lt;reuse&gt;true&lt;\/reuse&gt;\r\n         &lt;autoExtend&gt;true&lt;\/autoExtend&gt;\r\n         &lt;increment unit=&quot;KB&quot;&gt;4096&lt;\/increment&gt;\r\n         &lt;maxSize unit=&quot;MB&quot;&gt;2048&lt;\/maxSize&gt;\r\n      &lt;\/DatafileAttributes&gt;\r\n      &lt;DatafileAttributes id=&quot;{DATA_PATH1}\/system-001-{DB_NAME}.dbf&quot;&gt;\r\n         &lt;tablespace&gt;SYSTEM&lt;\/tablespace&gt;\r\n         &lt;temporary&gt;false&lt;\/temporary&gt;\r\n         &lt;online&gt;true&lt;\/online&gt;\r\n         &lt;status&gt;0&lt;\/status&gt;\r\n         &lt;size unit=&quot;MB&quot;&gt;1024&lt;\/size&gt;\r\n         &lt;reuse&gt;true&lt;\/reuse&gt;\r\n         &lt;autoExtend&gt;true&lt;\/autoExtend&gt;\r\n         &lt;increment unit=&quot;KB&quot;&gt;8192&lt;\/increment&gt;\r\n         &lt;maxSize unit=&quot;MB&quot;&gt;4096&lt;\/maxSize&gt;\r\n      &lt;\/DatafileAttributes&gt;\r\n      &lt;DatafileAttributes id=&quot;{DATA_PATH1}\/tempts-001-{DB_NAME}.dbf&quot;&gt;\r\n         &lt;tablespace&gt;TEMPTS&lt;\/tablespace&gt;\r\n         &lt;temporary&gt;false&lt;\/temporary&gt;\r\n         &lt;online&gt;true&lt;\/online&gt;\r\n         &lt;status&gt;0&lt;\/status&gt;\r\n         &lt;size unit=&quot;MB&quot;&gt;128&lt;\/size&gt;\r\n         &lt;reuse&gt;true&lt;\/reuse&gt;\r\n         &lt;autoExtend&gt;true&lt;\/autoExtend&gt;\r\n         &lt;increment unit=&quot;KB&quot;&gt;2048&lt;\/increment&gt;\r\n         &lt;maxSize unit=&quot;MB&quot;&gt;8192&lt;\/maxSize&gt;\r\n      &lt;\/DatafileAttributes&gt;\r\n      &lt;DatafileAttributes id=&quot;{DATA_PATH1}\/undots-001-{DB_NAME}.dbf&quot;&gt;\r\n         &lt;tablespace&gt;UNDOTBS1&lt;\/tablespace&gt;\r\n         &lt;temporary&gt;false&lt;\/temporary&gt;\r\n         &lt;online&gt;true&lt;\/online&gt;\r\n         &lt;status&gt;0&lt;\/status&gt;\r\n         &lt;size unit=&quot;MB&quot;&gt;512&lt;\/size&gt;\r\n         &lt;reuse&gt;true&lt;\/reuse&gt;\r\n         &lt;autoExtend&gt;true&lt;\/autoExtend&gt;\r\n         &lt;increment unit=&quot;KB&quot;&gt;2028&lt;\/increment&gt;\r\n         &lt;maxSize unit=&quot;MB&quot;&gt;8192&lt;\/maxSize&gt;\r\n      &lt;\/DatafileAttributes&gt;\r\n      &lt;TablespaceAttributes id=&quot;SYSAUX&quot;&gt;\r\n         &lt;online&gt;true&lt;\/online&gt;\r\n         &lt;offlineMode&gt;1&lt;\/offlineMode&gt;\r\n         &lt;readOnly&gt;false&lt;\/readOnly&gt;\r\n         &lt;temporary&gt;false&lt;\/temporary&gt;\r\n         &lt;defaultTemp&gt;false&lt;\/defaultTemp&gt;\r\n         &lt;undo&gt;false&lt;\/undo&gt;\r\n         &lt;local&gt;true&lt;\/local&gt;\r\n         &lt;blockSize&gt;-1&lt;\/blockSize&gt;\r\n         &lt;allocation&gt;1&lt;\/allocation&gt;\r\n         &lt;uniAllocSize unit=&quot;KB&quot;&gt;-1&lt;\/uniAllocSize&gt;\r\n         &lt;initSize unit=&quot;KB&quot;&gt;64&lt;\/initSize&gt;\r\n         &lt;increment unit=&quot;KB&quot;&gt;64&lt;\/increment&gt;\r\n         &lt;incrementPercent&gt;50&lt;\/incrementPercent&gt;\r\n         &lt;minExtends&gt;1&lt;\/minExtends&gt;\r\n         &lt;maxExtends&gt;4096&lt;\/maxExtends&gt;\r\n         &lt;minExtendsSize unit=&quot;KB&quot;&gt;64&lt;\/minExtendsSize&gt;\r\n         &lt;logging&gt;true&lt;\/logging&gt;\r\n         &lt;recoverable&gt;false&lt;\/recoverable&gt;\r\n         &lt;maxFreeSpace&gt;0&lt;\/maxFreeSpace&gt;\r\n         &lt;bigfile&gt;false&lt;\/bigfile&gt;\r\n         &lt;datafilesList&gt;\r\n            &lt;TablespaceDatafileAttributes id=&quot;{DATA_PATH1}\/sysaux-001-{DB_NAME}.dbf&quot;\/&gt;\r\n         &lt;\/datafilesList&gt;\r\n      &lt;\/TablespaceAttributes&gt;\r\n      &lt;TablespaceAttributes id=&quot;TOOLTS&quot;&gt;\r\n         &lt;online&gt;true&lt;\/online&gt;\r\n         &lt;offlineMode&gt;1&lt;\/offlineMode&gt;\r\n         &lt;readOnly&gt;false&lt;\/readOnly&gt;\r\n         &lt;temporary&gt;false&lt;\/temporary&gt;\r\n         &lt;defaultTemp&gt;false&lt;\/defaultTemp&gt;\r\n         &lt;undo&gt;false&lt;\/undo&gt;\r\n         &lt;local&gt;true&lt;\/local&gt;\r\n         &lt;blockSize&gt;-1&lt;\/blockSize&gt;\r\n         &lt;allocation&gt;1&lt;\/allocation&gt;\r\n         &lt;uniAllocSize unit=&quot;KB&quot;&gt;-1&lt;\/uniAllocSize&gt;\r\n         &lt;initSize unit=&quot;KB&quot;&gt;128&lt;\/initSize&gt;\r\n         &lt;increment unit=&quot;KB&quot;&gt;128&lt;\/increment&gt;\r\n         &lt;incrementPercent&gt;0&lt;\/incrementPercent&gt;\r\n         &lt;minExtends&gt;1&lt;\/minExtends&gt;\r\n         &lt;maxExtends&gt;4096&lt;\/maxExtends&gt;\r\n         &lt;minExtendsSize unit=&quot;KB&quot;&gt;128&lt;\/minExtendsSize&gt;\r\n         &lt;logging&gt;true&lt;\/logging&gt;\r\n         &lt;recoverable&gt;false&lt;\/recoverable&gt;\r\n         &lt;maxFreeSpace&gt;0&lt;\/maxFreeSpace&gt;\r\n         &lt;bigfile&gt;false&lt;\/bigfile&gt;\r\n         &lt;datafilesList&gt;\r\n            &lt;TablespaceDatafileAttributes id=&quot;{DATA_PATH1}\/toolts-001-{DB_NAME}.dbf&quot;\/&gt;\r\n         &lt;\/datafilesList&gt;\r\n      &lt;\/TablespaceAttributes&gt;\r\n      &lt;TablespaceAttributes id=&quot;SYSTEM&quot;&gt;\r\n         &lt;online&gt;true&lt;\/online&gt;\r\n         &lt;offlineMode&gt;1&lt;\/offlineMode&gt;\r\n         &lt;readOnly&gt;false&lt;\/readOnly&gt;\r\n         &lt;temporary&gt;false&lt;\/temporary&gt;\r\n         &lt;defaultTemp&gt;false&lt;\/defaultTemp&gt;\r\n         &lt;undo&gt;false&lt;\/undo&gt;\r\n         &lt;local&gt;true&lt;\/local&gt;\r\n         &lt;blockSize&gt;-1&lt;\/blockSize&gt;\r\n         &lt;allocation&gt;3&lt;\/allocation&gt;\r\n         &lt;uniAllocSize unit=&quot;KB&quot;&gt;-1&lt;\/uniAllocSize&gt;\r\n         &lt;initSize unit=&quot;KB&quot;&gt;64&lt;\/initSize&gt;\r\n         &lt;increment unit=&quot;KB&quot;&gt;64&lt;\/increment&gt;\r\n         &lt;incrementPercent&gt;50&lt;\/incrementPercent&gt;\r\n         &lt;minExtends&gt;1&lt;\/minExtends&gt;\r\n         &lt;maxExtends&gt;-1&lt;\/maxExtends&gt;\r\n         &lt;minExtendsSize unit=&quot;KB&quot;&gt;64&lt;\/minExtendsSize&gt;\r\n         &lt;logging&gt;true&lt;\/logging&gt;\r\n         &lt;recoverable&gt;false&lt;\/recoverable&gt;\r\n         &lt;maxFreeSpace&gt;0&lt;\/maxFreeSpace&gt;\r\n         &lt;bigfile&gt;false&lt;\/bigfile&gt;\r\n         &lt;datafilesList&gt;\r\n            &lt;TablespaceDatafileAttributes id=&quot;{DATA_PATH1}\/system-001-{DB_NAME}.dbf&quot;\/&gt;\r\n         &lt;\/datafilesList&gt;\r\n      &lt;\/TablespaceAttributes&gt;\r\n      &lt;TablespaceAttributes id=&quot;TEMPTS&quot;&gt;\r\n         &lt;online&gt;true&lt;\/online&gt;\r\n         &lt;offlineMode&gt;1&lt;\/offlineMode&gt;\r\n         &lt;readOnly&gt;false&lt;\/readOnly&gt;\r\n         &lt;temporary&gt;true&lt;\/temporary&gt;\r\n         &lt;defaultTemp&gt;true&lt;\/defaultTemp&gt;\r\n         &lt;undo&gt;false&lt;\/undo&gt;\r\n         &lt;local&gt;true&lt;\/local&gt;\r\n         &lt;blockSize&gt;-1&lt;\/blockSize&gt;\r\n         &lt;allocation&gt;1&lt;\/allocation&gt;\r\n         &lt;uniAllocSize unit=&quot;KB&quot;&gt;1012&lt;\/uniAllocSize&gt;\r\n         &lt;initSize unit=&quot;KB&quot;&gt;64&lt;\/initSize&gt;\r\n         &lt;increment unit=&quot;KB&quot;&gt;64&lt;\/increment&gt;\r\n         &lt;incrementPercent&gt;0&lt;\/incrementPercent&gt;\r\n         &lt;minExtends&gt;1&lt;\/minExtends&gt;\r\n         &lt;maxExtends&gt;0&lt;\/maxExtends&gt;\r\n         &lt;minExtendsSize unit=&quot;KB&quot;&gt;64&lt;\/minExtendsSize&gt;\r\n         &lt;logging&gt;true&lt;\/logging&gt;\r\n         &lt;recoverable&gt;false&lt;\/recoverable&gt;\r\n         &lt;maxFreeSpace&gt;0&lt;\/maxFreeSpace&gt;\r\n         &lt;bigfile&gt;false&lt;\/bigfile&gt;\r\n         &lt;datafilesList&gt;\r\n            &lt;TablespaceDatafileAttributes id=&quot;{DATA_PATH1}\/tempts-001-{DB_NAME}.dbf&quot;\/&gt;\r\n         &lt;\/datafilesList&gt;\r\n      &lt;\/TablespaceAttributes&gt;\r\n      &lt;TablespaceAttributes id=&quot;UNDOTS&quot;&gt;\r\n         &lt;online&gt;true&lt;\/online&gt;\r\n         &lt;offlineMode&gt;1&lt;\/offlineMode&gt;\r\n         &lt;readOnly&gt;false&lt;\/readOnly&gt;\r\n         &lt;temporary&gt;false&lt;\/temporary&gt;\r\n         &lt;defaultTemp&gt;false&lt;\/defaultTemp&gt;\r\n         &lt;undo&gt;true&lt;\/undo&gt;\r\n         &lt;local&gt;true&lt;\/local&gt;\r\n         &lt;blockSize&gt;-1&lt;\/blockSize&gt;\r\n         &lt;allocation&gt;1&lt;\/allocation&gt;\r\n         &lt;uniAllocSize unit=&quot;KB&quot;&gt;-1&lt;\/uniAllocSize&gt;\r\n         &lt;initSize unit=&quot;KB&quot;&gt;512&lt;\/initSize&gt;\r\n         &lt;increment unit=&quot;KB&quot;&gt;512&lt;\/increment&gt;\r\n         &lt;incrementPercent&gt;50&lt;\/incrementPercent&gt;\r\n         &lt;minExtends&gt;8&lt;\/minExtends&gt;\r\n         &lt;maxExtends&gt;4096&lt;\/maxExtends&gt;\r\n         &lt;minExtendsSize unit=&quot;KB&quot;&gt;512&lt;\/minExtendsSize&gt;\r\n         &lt;logging&gt;true&lt;\/logging&gt;\r\n         &lt;recoverable&gt;false&lt;\/recoverable&gt;\r\n         &lt;maxFreeSpace&gt;0&lt;\/maxFreeSpace&gt;\r\n         &lt;bigfile&gt;false&lt;\/bigfile&gt;\r\n         &lt;datafilesList&gt;\r\n            &lt;TablespaceDatafileAttributes id=&quot;{DATA_PATH1}\/undots-001-{DB_NAME}.dbf&quot;\/&gt;\r\n         &lt;\/datafilesList&gt;\r\n      &lt;\/TablespaceAttributes&gt;\r\n      &lt;RedoLogGroupAttributes id=&quot;1&quot;&gt;\r\n         &lt;reuse&gt;false&lt;\/reuse&gt;\r\n         &lt;fileSize unit=&quot;KB&quot;&gt;204800&lt;\/fileSize&gt;\r\n         &lt;Thread&gt;1&lt;\/Thread&gt;\r\n         &lt;member ordinal=&quot;0&quot; memberName=&quot;redo-g1-m1-{DB_NAME}.dbf&quot; filepath=&quot;{REDO_PATH1}\/&quot;\/&gt;\r\n         &lt;member ordinal=&quot;1&quot; memberName=&quot;redo-g1-m2-{DB_NAME}.log&quot; filepath=&quot;{REDO_PATH2}\/&quot;\/&gt;\r\n      &lt;\/RedoLogGroupAttributes&gt;\r\n      &lt;RedoLogGroupAttributes id=&quot;2&quot;&gt;\r\n         &lt;reuse&gt;false&lt;\/reuse&gt;\r\n         &lt;fileSize unit=&quot;KB&quot;&gt;204800&lt;\/fileSize&gt;\r\n         &lt;Thread&gt;1&lt;\/Thread&gt;\r\n         &lt;member ordinal=&quot;0&quot; memberName=&quot;redo-g2-m1-{DB_NAME}.dbf&quot; filepath=&quot;{REDO_PATH1}\/&quot;\/&gt;\r\n         &lt;member ordinal=&quot;1&quot; memberName=&quot;redo-g2-m2-{DB_NAME}.log&quot; filepath=&quot;{REDO_PATH2}\/&quot;\/&gt;\r\n      &lt;\/RedoLogGroupAttributes&gt;\r\n      &lt;RedoLogGroupAttributes id=&quot;3&quot;&gt;\r\n         &lt;reuse&gt;false&lt;\/reuse&gt;\r\n         &lt;fileSize unit=&quot;KB&quot;&gt;204800&lt;\/fileSize&gt;\r\n         &lt;Thread&gt;1&lt;\/Thread&gt;\r\n         &lt;member ordinal=&quot;0&quot; memberName=&quot;redo-g3-m1-{DB_NAME}.dbf&quot; filepath=&quot;{REDO_PATH1}\/&quot;\/&gt;\r\n         &lt;member ordinal=&quot;1&quot; memberName=&quot;redo-g3-m2-{DB_NAME}.log&quot; filepath=&quot;{REDO_PATH2}\/&quot;\/&gt;\r\n      &lt;\/RedoLogGroupAttributes&gt;\r\n   &lt;\/StorageAttributes&gt;\r\n&lt;\/DatabaseTemplate&gt;\r\n<\/pre>\n<p>We&#8217;re now ready to create the database by calling DBCA:<\/p>\n<pre class=\"brush: bash; collapse: false; title: ; wrap-lines: false; notranslate\" title=\"\">\r\nexport ORACLE_BASE=\/u01\/app\/oracle\r\nexport ORACLE_HOME=${ORACLE_BASE}\/product\/ora12201\r\nexport PATH=${ORACLE_HOME}\/bin:${PATH}\r\n\r\n${ORACLE_HOME}\/bin\/dbca -silent -createDatabase \\\r\n  -templateName &quot;\/tmp\/dbca-newdb-linux.dbt&quot; \\\r\n  -gdbName &quot;${NEW_GLOBAL_DBNAME}&quot; \\\r\n  -characterSet &quot;${NEW_DB_CHARSET}&quot; \\\r\n  -createAsContainerDatabase &quot;true&quot; \\\r\n  -databaseConfigType SINGLE \\\r\n  -dbOptions &quot;ORACLE_TEXT:true&quot; \\\r\n  -databaseType MULTIPURPOSE \\\r\n  -dvConfiguration &quot;false&quot; \\\r\n  -emConfiguration &quot;NONE&quot; \\\r\n  -enableArchive &quot;true&quot; \\\r\n  -archiveLogDest &quot;${NEW_ARCH_PATH1}&quot; \\\r\n  -listeners &quot;${INIT_LISTENER_REG}&quot; \\\r\n  -nationalCharacterSet &quot;AL16UTF16&quot; \\\r\n  -olsConfiguration &quot;false&quot; \\\r\n  -recoveryAreaDestination &quot;NONE&quot; \\\r\n  -redoLogFileSize &quot;${NEW_REDO_SIZE_MB}&quot; \\\r\n  -registerWithDirService &quot;false&quot; \\\r\n  -sampleSchema &quot;false&quot; \\\r\n  -sid &quot;${NEW_ORACLE_SID}&quot; \\\r\n  -sysPassword &quot;${NEW_SYS_PWD}&quot; \\\r\n  -systemPassword &quot;${NEW_SYSTEM_PWD}&quot; \\\r\n  -useOMF &quot;false&quot; \\\r\n  -variablesFile \/tmp\/dbca-vars.txt \\\r\n  -initParams &quot;compatible=${INIT_COMPATIBLE},control_management_pack_access=${INIT_CMPA},db_domain=${NEW_DB_DOMAIN},db_name=${NEW_DB_NAME},db_unique_name=${NEW_DB_UNIQUE_NAME},local_listener=${INIT_LISTENER_REG},optimizer_features_enable=${INIT_OFE},pga_aggregate_target=${INIT_PGA_AGG_TGT},processes=${INIT_PROCESSES},sga_target=${INIT_SGA_TGT}&quot;\r\n<\/pre>\n<p>Couple of things to note:<\/p>\n<ul>\n<li>This will create an empty CDB<\/li>\n<li>The template specifies not to install all the options. In this example I&#8217;ve chosen I want to install Oracle Text<\/li>\n<li>The database will be in archivelog mode<\/li>\n<li>Because of a bug, the controlfiles are not be multiplexed. You have to correct this manually after DBCA finishes<\/li>\n<li>The DBCA can be extremely flexible by using variables (placeholders in template)<\/li>\n<li>A lot can be configured via DBCA but not everything. E.g. I like most DB&#8217;s running in FORCE LOGGING mode<\/li>\n<li>It never hurts to run &quot;dbca -silent -&lt;command&gt; -h&quot; to see what it can do<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been playing with Oracle 12.2 lately, which also means I do lots of silent installations of it :-). I don&#8217;t know why I just put a smiley there because there was nothing funny about it! Troubleshooting DBCA errors, combing through logs, and raising service requests with Oracle Support almost sucked the joy out of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,14],"tags":[],"class_list":["post-155","post","type-post","status-publish","format-standard","hentry","category-general","category-silent"],"_links":{"self":[{"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=\/wp\/v2\/posts\/155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=155"}],"version-history":[{"count":5,"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=\/wp\/v2\/posts\/155\/revisions"}],"predecessor-version":[{"id":160,"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=\/wp\/v2\/posts\/155\/revisions\/160"}],"wp:attachment":[{"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.spotonoracle.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}