Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Not enough space for Oracle shared memory segment

ALH
Occasional Advisor

Not enough space for Oracle shared memory segment

During the shutdown procedure of our Oracle database we get the message:
SVRMGR> ORA-07306: sms1sg: shmget error, unable to get a shared memory segment.
HP-UX Error: 12: Not enough space

Our shutdown procedure is:
connect internal
shutdown abort
startup restrict
shutdown immediate

With the startup command we get the error.

My question is now:
What is the reason of this errormesage and what for relation is there between Oracle en hp-ux for deleting the shared memory segment.
Is there a fix if this problem is structurel.

we have hp-ux 10.20 en Oracle 7.3.4.4.1

Thank You
Cees Wielink
8 REPLIES
Rob Smith
Respected Contributor

Re: Not enough space for Oracle shared memory segment

Hi, I am not a DBA but there may be something wrong with the way you are shutting down. Obviously it is not releasing it's shared memory segment. I have had this problem on a couple of occassions running Oracle 7.3.2 and the only way I could get it back up was to reboot the server. Hope this helps.

Rob

Learn the rules so you can break them properly.
ALH
Occasional Advisor

Re: Not enough space for Oracle shared memory segment

Additional info:

After this error the database was backed up. After the backup there was a script started that starts up the Oracle database. This was done without any errors. Only a crash recovery of oracle. The database runs OK.
So, was the delete of the shared memory segment slow??????
Volker Borowski
Honored Contributor

Re: Not enough space for Oracle shared memory segment

Hi Cees,

check what else is running on this box, you might need to extend swap and kernel parameters.

Volker
Mladen Despic
Honored Contributor

Re: Not enough space for Oracle shared memory segment

My 2 cents:

When Oracle is shut down, other processes running on the system may be locking memory thus not leaving enough for Oracle to restart properly. A system reboot will likely fix this, but you will probably want to avoid rebooting the system every time you want to restart Oracle.

Is your pseudo-swap enabled? (If 'swapinfo -tam' displays a "memory" line, then your pseudo-swap is enabled.) If it is, it may be competing with Oracle for locked memory. In any case, Oracle recommends that pseudo-swap be disabled on a system running Oracle database, i.e., change the value of the kernel parameter swapmem_on from 1 to 0. Before making this change, make sure that there is enough swap on disk.
Kieran Lismore
Occasional Visitor

Re: Not enough space for Oracle shared memory segment

Hello!

My suggestion is to verify the max number of semaphores on your kernel and also the limit of max shared memory segm.

You can check the shared memory/semaphores using the command "ipcs -a".
Wodisch
Honored Contributor

Re: Not enough space for Oracle shared memory segment

Hello ALH,

a couple of things to mention:
1) you should insert "alter system checkpoint"
into your commands to speed up the startup:
connect internal
alter system checkpoint;
shutdown abort
startup restrict
shutdown immediate
2) it seems to be an old and re-occuring error
that semaphores are not released on shutdown
check by including "!ipcs -sb -mb" after the
"shutdown abort" command in your list. If
you see something owned by "oracle" (or
whateve is the name of your local "owner"),
especially when there is a "D" as first
character of the "permissions" (=Delete),
then that entry is deleted - but still there
3) you might really running out of free RAM or
swap, so test check wether your instance is
using the parameters "lock_sga=true" and/or
"pre_page_sga=true". and insert a comand
like "!vmstat 1 5" or so into your command
chain

HTH,
Wodisch
Magdi KAMAL
Respected Contributor

Re: Not enough space for Oracle shared memory segment

Hi

Beside you are using "Shudown abort" which is really dangerous, you should increase your swap space to 3 or 4 times the amount of your memory.

What could happend that, while the hp-ux system is still releasing the shared memory segments due to your "shutdown abort", it gets a new request for "startup restrict" which asks for the same amount of memory segments which hp-ux could not get from memory and even could not reserve space in the swap space.

for me 2 points :

1. Change you strategy of "shutdown abort" and "startup restrict".
2. Control your swap size.
John Poff
Honored Contributor

Re: Not enough space for Oracle shared memory segment