# Oracle 10g R2 not enough shared pool memory

## ali3nx

I've been following the Gentoo Wiki guide on setting up Oracle 10g on Gentoo Linux and updating some of the guide to reflect the current version of Oracle 10g R2 (10.2.0.1.0) mostly using one of my two amd smp 246 opteron systems which has 2GB of ecc DR400 crucial. It's currently not running hardened or selinux as i've been known to use on the majority of my server systems since this system is internal and sitting behind a bucketload of cisco equiptment   :Wink:   It's mostly used as a vmware GSX server, a development platform and for educational labs. When i had installed the system I setup a 2GB swapfile which has been expanded with 1.5GB of tempswap. Okay so why all the fuss? 

```
oracle@hammer ~ $ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Apr 23 02:08:20 2006

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> connect / as sysdba

Connected to an idle instance.

SQL> startup nomount

ORA-00371: not enough shared pool memory, should be atleast 123232153 bytes

SQL> startup nomount

ORA-00371: not enough shared pool memory, should be atleast 123232153 bytes

SQL> exit

Disconnected

oracle@hammer ~ $ cat /proc/sys/kernel/shmmax

2147483648
```

Strange indeed because I have all the proper settings applied Oracle recommends for 10g on linux. Mostly the same the wiki howto recommends. One major advantage amd64 has over x86 is that the address space does not need to be split to compensate ie. 1G/3G as seen in x86 2.6.16 linux menuconfig which I had originally thought may be responsable but it turns out that option in the linux kernel is not available for amd64/opteron/em64t   :Confused: 

```
hammer linux # cat /etc/sysctl.conf

# /etc/sysctl.conf

#

# For more information on how this file works, please see

# the manpages sysctl(8) and sysctl.conf(5).

#

# In order for this file to work properly, you must first

# enable 'Sysctl support' in the kernel.

#

# Look in /proc/sys/ for all the things you can setup.

#

# Disables packet forwarding

#net.ipv4.ip_forward = 0

# Disables IP dynaddr

#net.ipv4.ip_dynaddr = 0

# Disable ECN

#net.ipv4.tcp_ecn = 0

# Enables source route verification

net.ipv4.conf.default.rp_filter = 1

# Enable reverse path

net.ipv4.conf.all.rp_filter = 1

# Enable SYN cookies (yum!)

# http://cr.yp.to/syncookies.html

net.ipv4.tcp_syncookies = 1

# Disable source route

#net.ipv4.conf.all.accept_source_route = 0

#net.ipv4.conf.default.accept_source_route = 0

# Disable redirects

#net.ipv4.conf.all.accept_redirects = 0

#net.ipv4.conf.default.accept_redirects = 0

# Disable secure redirects

#net.ipv4.conf.all.secure_redirects = 0

#net.ipv4.conf.default.secure_redirects = 0

# Ignore ICMP broadcasts

#net.ipv4.icmp_echo_ignore_broadcasts = 1

# Disables the magic-sysrq key

#kernel.sysrq = 0

# When the kernel panics, automatically reboot in 3 seconds

#kernel.panic = 3

# Allow for more PIDs (cool factor!); may break some programs

#kernel.pid_max = 999999

# TCP Port for lock manager

#fs.nfs.nlm_tcpport = 0

# UDP Port for lock manager

#fs.nfs.nlm_udpport = 0

# Oracle Options

kernel.shmall = 2097152

kernel.shmmax = 2147483648

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 1024    61000
```

If anyone has a suggestion I'm all ears. Apok if your out there buddy perhaps your feeling helpful on a sunday   :Smile: 

----------

## dgaffuri

That's probably an instance parameter that is not set correctly. Check SGA_MAX_SIZE and SHARED_POOL_SIZE

```
SQL> startup  nomount

ORACLE instance started.

Total System Global Area  289406976 bytes

Fixed Size                  1219016 bytes

Variable Size              83887672 bytes

Database Buffers          201326592 bytes

Redo Buffers                2973696 bytes

SQL> show parameter sga_max_size

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

sga_max_size                         big integer 276M

SQL> show parameter shared_pool_size

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

shared_pool_size                     big integer 0
```

----------

## ali3nx

Hi thanks for the reply  :Very Happy:   Whereabouts would one set those vars in R2?

----------

## dgaffuri

It depends on how you've created your DB, it could be a text file or a server parameter file. Look here for an overview of parameter files in Oracle.

You may also want to take a look here for SGA size related info.

----------

## ali3nx

Hey thanks! I'll be sure to add this useful information into the wiki article unless someone beats me to it   :Smile: 

```
oracle@hammer ~/product/10.2.0/dbs $ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Apr 23 13:13:03 2006

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

SQL> connect / as sysdba

Connected to an idle instance.

SQL> startup nomount

ORACLE instance started.

Total System Global Area 2214592512 bytes

Fixed Size                  2022248 bytes

Variable Size            2189427864 bytes

Database Buffers            8388608 bytes

Redo Buffers               14753792 bytes

SQL> shutdown immediate

ORA-01507: database not mounted

ORACLE instance shut down.

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production

With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options

```

----------

