Oracle Database Silent Install Failing on Shared Pool/SGA Size – Fix

oracleoracle-12c

I am running the following command:

dbca -silent -createDatabase -templateName foobar.dbt -responseFile NO_VALUE -gdbname foo1 -sid foo1 -emConfiguration NONE -automaticMemoryManagement true -initParams memory_max_target='2048M',memory_target='1638M',sga_max_size='1638M',sga_target='0M',pga_aggregate_target='0M',pga_aggregate_limit='0M'

This fails and I receive the following in the log:

The specified shared pool size or SGA size "80MB" does not meet the recommended minimum size requirement "331MB". This will make database creation fail. Do you want to continue?

Unique database identifier check passed.

/apps/oradata/ has enough space. Required space is 1775 MB , available space is 2507 MB.
File Validations Successful.
Cleaning up failed steps
DBCA_PROGRESS : 5%
Creating and starting Oracle instance
DBCA_PROGRESS : 6%
DBCA_PROGRESS : 8%
DBCA_PROGRESS : 9%
ORA-01078: failure in processing system parameters

DBCA_PROGRESS : 10%
ORA-01034: ORACLE not available

ORA-01034: ORACLE not available

DBCA_PROGRESS : DBCA Operation failed.

The parameters specified are our standard. (1638M is 80% of MAX_MEMORY_TARGET). Usually we set the memory parameters after the database is created, I'm trying to do it during creation instead.

I do not know where the log is grabbing "80MB" from. To my knowledge, it should be set to 0 because I am setting SGA_TARGET to 0.

I suspect that maybe I am doing something contradicting, or maybe I should be considering other parameters to set manually. Could it be that by setting SGA_TARGET to 0 and MEMORY_TARGET to 0, that I am confusing Oracle on whether or not it should be using Automatic Memory Management, and it tries using it anyway which is setting the shared pool to 80MB?

Best Answer

After testing your code, found the issue and modified the command which works fine for me.

[oracle@oracle templates]$ dbca -silent -createDatabase -templateName General_Purpose.dbc -responseFile NO_VALUE -gdbname oracdb -sid oracdb -emConfiguration NONE -storageType ASM -asmsnmpPassword grid -diskGroupName +DATA  -initParams memory_max_target='1300M',memory_target='1300M',sga_max_size='1300M',sga_target='0M',pga_aggregate_target='0M',pga_aggregate_limit='0M'
Enter SYS user password: 

Enter SYSTEM user password: 

Registering database with Oracle Restart
5% complete
Copying database files
7% complete
8% complete
9% complete
10% complete
DBCA Operation failed.
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/oracdb/oracdb12.log" for further details.

The error log.

[oracle@oracle templates]$ cat /u01/app/oracle/cfgtoollogs/dbca/oracdb/oracdb12.log
The specified shared pool size or SGA size "80MB" does not meet the recommended minimum size requirement "331MB". This will make database creation fail. Do you want to continue?

Unique database identifier check passed.

+DATA has enough space. Required space is 6262 MB , available space is 10195 MB.
File Validations Successful.
Registering database with Oracle Restart
DBCA_PROGRESS : 5%
Copying database files
DBCA_PROGRESS : 7%
DBCA_PROGRESS : 8%
ORA-01078: failure in processing system parameters

DBCA_PROGRESS : 9%
DBCA_PROGRESS : 10%
ORA-01034: ORACLE not available

ORA-01034: ORACLE not available

DBCA_PROGRESS : DBCA Operation failed

I faced the same error as you have.

[oracle@oracle admin]$ oerr ora 01078
01078, 00000, "failure in processing system parameters"
// *Cause:  Failure during processing of INIT.ORA parameters during
//        system startup.
// *Action:  Further diagnostic information should be in the error stack.

Further information is the error message ORACLE not available, which means instance creation is failed.

During the database creation, DBCA creates a dummy init.ora files under the ORACLE_BASE/cfgtoollogs/dbca/<oracle_SID>/ directory.

Let's see what parameters were used in the init files for that instance.

[oracle@oracle oracdb]$ cat initoracdbTempOMF.ora
##############################################################################
# Copyright (c) 1991, 2013 by Oracle Corporation
##############################################################################

###########################################
# Cache and I/O
###########################################
db_block_size=8192

###########################################
# Cursors and Library Cache
###########################################
open_cursors=300

###########################################
# Database Identification
###########################################
db_domain=""
db_name="seeddata"

###########################################
# File Configuration
###########################################
db_create_file_dest="+DATA"
db_recovery_file_dest="+DATA"
db_recovery_file_dest_size=4560m

###########################################
# Miscellaneous
###########################################
compatible=12.1.0.2.0
diagnostic_dest=/u01/app/oracle
memory_max_target=1300M
memory_target=Unexpected error!!!
pga_aggregate_limit=0M

###########################################
# Network Registration
###########################################
local_listener=LISTENER_ORACDB

###########################################
# Processes and Sessions
###########################################
processes=300

###########################################
# SGA Memory
###########################################
sga_max_size=1300M
sga_target=0M

###########################################
# Security and Auditing
###########################################
audit_file_dest="/u01/app/oracle/admin/oracdb/adump"
audit_trail=db
remote_login_passwordfile=EXCLUSIVE

###########################################
# Shared Server
###########################################
dispatchers="(PROTOCOL=TCP) (SERVICE=oracdbXDB)"

###########################################
# Sort, Hash Joins, Bitmap Indexes
###########################################
pga_aggregate_target=0M

###########################################
# System Managed Undo and Rollback Segments
###########################################
undo_tablespace=UNDOTBS1

db_unique_name="oracdb"
_diag_hm_rc_enabled=false
control_files="/u01/app/oracle/cfgtoollogs/dbca/oracdb/tempControl.ctl"
enable_pluggable_database=true

MEMORY_TARGET=Unexpected Error!

There was the main problem. Then I tried to edit the command and removed that size delimiter M then ran the command once again.

[oracle@oracle templates]$ dbca -silent -createDatabase -templateName General_Purpose.dbc -responseFile NO_VALUE -gdbname oracdb -sid oracdb -emConfiguration NONE -storageType ASM -asmsnmpPassword grid -diskGroupName +Data  -initParams memory_max_target='1300M',memory_target='1300'
Enter SYS user password: 

Enter SYSTEM user password: 

Cleaning up failed steps
5% complete
Registering database with Oracle Restart
11% complete
Copying database files
12% complete
14% complete
21% complete
27% complete
34% complete
44% complete
Creating and starting Oracle instance
46% complete
51% complete
52% complete
53% complete
58% complete
62% complete
63% complete
66% complete
Completing Database Creation
70% complete
73% complete
76% complete
86% complete
96% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/oracdb/oracdb13.log" for further details.
[oracle@oracle templates]$ 

And it has completed successfully.

The memory target value appeared as memory_target=1300m.

I don't know why the DBCA has made that error. Same time other parameters are using same values(with the character M) as valid value.

If you wish to use automatic memory management and provide memory related parameters with templates in DBCA silent mlde, you can use -automaticMemoryManagement true(which forces to use memory target hence its not necessary to use memory parameters) along with -totalMemory <memory allocated for Oracle in MB>.

Example: ...-automaticMemoryManagement true -totalMemory 1650 is equivalent to ... -initParams memory_target = '1650'. Size is expressed in MB.

sga_target and sga_max_target parameters are not supported on command line. Details are in MOS document(2212857.1)