Sean Scott is an Oracle ACE with over 25 years experience IN Oracle technologies

Oracle 19c rpm Install on OCI Free Compute Instance

Oracle 19c rpm Install on OCI Free Compute Instance

Oracle introduced rpm installation of database software with version 18c. It’s a fast, easy way to install an Oracle home and even configuring a database. These instructions describe the method for the rpm install on Oracle on Oracle Linux or Red Hat Enterprise. Substitute 19c for 18c in each of the commands to get a 19c installation.

A neat part is the ability to create a starter database with a single command as the root user:

/etc/init.d/oracledb_ORCLDB-19c configure

I needed a quick database for an upcoming presentation and decided to install it on a compute instance on my free OCI tier. The rpm installation ran fine but I encountered problems with database creation:

# /etc/init.d/oracledb_ORCLCDB-19c configure 
Configuring Oracle Database ORCLCDB. 
[WARNING] [DBT-11205] Specified shared pool size does not meet the recommended minimum size requirement. This might cause database creation to fail.
   ACTION: Specify at least (529 MB) for shared pool size. 
Prepare for db operation 
8% complete 
Copying database files 
31% complete 
Creating and starting Oracle instance 
32% complete 
36% complete 
[WARNING] ORA-04031: unable to allocate 1048848 bytes of shared memory ("shared pool","unknown object","PDB Dynamic He","alls-ktimcem")  

[WARNING] ORA-04031: unable to allocate 1048848 bytes of shared memory ("shared pool","unknown object","PDB Dynamic He","alls-ktimcem")  

40% complete 
43% complete 
[WARNING] ORA-65020: pluggable database PDB$SEED already closed  

[WARNING] ORA-00900: invalid SQL statement  

[WARNING] ORA-00604: error occurred at recursive SQL level 1 ORA-01219: database or pluggable database not open: queries allowed on fixed tables or views only  

[WARNING] ORA-65020: pluggable database PDB$SEED already closed  

[WARNING] ORA-00900: invalid SQL statement  

46% complete 
100% complete 
[FATAL] Error while executing "/opt/oracle/product/19c/dbhome_1/ord/im/admin/ordlib.sql". Refer to "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ordlib0.log" for more details. Error in Process: /opt/oracle/product/19c/dbhome_1/perl/bin/perl 
31% complete 
8% complete 
0% complete 
Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB.log" for further details.  Database configuration failed. 

That’s not good and certainly not the quick and easy solution I was hoping for.

Digging through the logs, I discovered these entries:

[main] [ 2020-01-11 21:19:59.109 GMT ] [OsUtilsBase.getTotalPhysicalMemory:416]  Total Physical Memory in MB: 968
INFO: Jan 11, 2020 9:19:59 PM oracle.assistants.common.base.util.InitParamCollectionUtil getInitParam
INFO: Could not find the init param (memory_target) from init params.

INFO: Jan 11, 2020 9:19:59 PM oracle.assistants.common.base.util.InitParamCollectionUtil getInitParam
INFO: Could not find the init param (memory_target) from init params. So creating one.

INFO: Jan 11, 2020 9:19:59 PM oracle.assistants.common.base.util.InitParamCollectionUtil getInitParam
INFO: Could not find the init param (memory_target) from init params.

INFO: Jan 11, 2020 9:19:59 PM oracle.assistants.dbca.action.ConfigurationParamsAction updateMemorySettings
INFO: Memory percentage is specified:40

INFO: Jan 11, 2020 9:19:59 PM oracle.assistants.dbca.action.ConfigurationParamsAction updateMemorySettings
INFO: total memory calculated is:387 MB

Oracle is calculating the value of memory_target based on 40% of the system’s physical memory. So where is this 40% value coming from?

It’s in $ORACLE_HOME/assistants/dbca/templates/General_Purpose.dbc:

     <MiscParams>
         <databaseType>MULTIPURPOSE</databaseType>
         <maxUserConn>20</maxUserConn>
         <percentageMemTOSGA>40</percentageMemTOSGA>
         <customSGA>false</customSGA>
         <dataVaultEnabled>false</dataVaultEnabled>
         <archiveLogMode>false</archiveLogMode>
         <initParamFileName>/pfile/init.ora</initParamFileName>
      </MiscParams>

I changed 40 to 75 and database creation ran as expected.

A side note: the initial database creation uses AMM:

INFO: Jan 11, 2020 9:45:38 PM oracle.assistants.common.base.util.InitParamCollectionUtil getInitParam
INFO: Could not find the init param (memory_target) from init params.

INFO: Jan 11, 2020 9:45:38 PM oracle.assistants.dbca.action.ConfigurationParamsAction updateMemorySettings
INFO: Memory percentage is specified:75

INFO: Jan 11, 2020 9:45:38 PM oracle.assistants.dbca.action.ConfigurationParamsAction updateMemorySettings
INFO: total memory calculated is:726 MB

Database creation then switches to ASMM:

INFO: Jan 11, 2020 9:45:38 PM oracle.assistants.dbca.action.ConfigurationParamsAction updateMemorySettings
INFO: automaticMemoryMgmtFeasible is false. So defaulting memoryMgmtType to ASMM

INFO: Jan 11, 2020 9:45:38 PM oracle.assistants.dbca.action.ConfigurationParamsAction updateMemoryParamsValues
INFO: Total memory used to calculate memory values:726 MB
<snip>
INFO: Jan 11, 2020 9:45:38 PM oracle.assistants.dbca.action.ConfigurationParamsAction updateMemoryParamsValues
INFO: sga_target value:544 MB pga_aggreegate_target value:182 MB

This is confirmed from the database post-creation:

SQL> show parameter target

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
archive_lag_target		     integer	 0
db_big_table_cache_percent_target    string	 0
db_flashback_retention_target	     integer	 1440
fast_start_io_target		     integer	 0
fast_start_mttr_target		     integer	 0
memory_max_target		     big integer 0
memory_target			     big integer 0
parallel_servers_target 	     integer	 40
pga_aggregate_target		     big integer 182M
sga_target			     big integer 544M
target_pdbs			     integer	 1
SQL> 

And there you have it. Oracle 19c running on OCI free compute!

Reporting and Automating Across Instances on a Host

Reporting and Automating Across Instances on a Host

Check for Services Not Running on Preferred Nodes

Check for Services Not Running on Preferred Nodes