|
Category :
Database
Resources -> RDBMS Server
DB Version
:
Oracle 8i / 9i
OS Details :
Sun Solaris9
SGA
in oracle translates to shared memory and semaphores on Unix.
Semaphores and shared memory are two very distinct sets of Operating
System resources. Semaphores are a system resource that Oracle
utilizes for interprocess communication and they occupy a relatively
small memory space, while shared memory is utilized to contain the SGA
and can utilize a large portion of physical memory.
Oracle uses shared memory and
semaphores to communicate between processes and
the SGA (System Global Area). There are certain requirements for
shared memory and the semaphores. When the Oracle instance comes up,
it allocates a certain portion of the main memory to create the SGA.
If the shared memory or the semaphores are not set properly, then it
gives an error related to shared memory or semaphores.
Listed below are some of the
oracle errors related to shared memory and semaphores:
ORA-7250 "spcre: semget error,
unable to get first semaphore set."
ORA-7279 "spcre: semget error, unable to get first semaphore set."
ORA-7251 "spcre: semget error, could not allocate any semaphores."
ORA-7252 "spcre: semget error, could not allocate any semaphores."
ORA-7339 "spcre: maximum number of semaphore sets exceeded."
ORA-3113 "end-of-file on communication channel" at instance startup.
ORA-27146 "post/wait initialization failed"
At the Unix level, the following
kernel parameters are used for configuring shared memory and
semaphores:
| SHMMAX
|
The maximum size(in
bytes) of a single shared memory segment. |
| SHMMIN
|
The minimum size(in
bytes) of a single shared memory segment. |
| SHMMNI
|
The number of shared
memory identifiers. |
| SHMSEG
|
The maximum number of
shared memory segments that can be attached by a process.
|
| SEMMNS
|
The number of semaphores
in the system. |
| SEMMNI
|
The number of semaphore
set identifiers in the system; determines the number of semaphore
sets that can be created at any one time. |
| SEMMSL
|
The maximum number of
sempahores that can be in one semaphore set. It should be same
size as maximum number of Oracle processes (The PROCESSES
parameter in the init.ora file) |
Oracle's interface to Unix
shared memory and semaphores:
The sysresv utility
included with Oracle8i and above provides instance status and various
OS resource information including shared memory identifier and
semaphore information for specified ORACLE_SIDs. This utility is
especially useful when multiple instances are running. OS resources
can be removed using this utility if the specified instance is
detected to be dead.
Usage:
sysresv [-if] [-d <on/off>] [-l sid1 <sid2> ...]
-i : Prompt before removing ipc resources for each sid
-f : Remove ipc resources silently, oevrrides -i option
-d <on/off> : List ipc resources for each sid if on
-l sid1 <sid2> .. : apply sysresv to each sid
Default : sysresv -d on -l $ORACLE_SID
ipc resources are attempted to be deleted for a sid only if there is
no currently running instance with that sid.
|