cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Remove shared memory of sap instance

Former Member
0 Kudos
47,128

Hi experts,

After sap instance restart we have clean the shared memory via cleanipc 00 remove.

can any one please how can i remove shared memory for sap instance.

REgards,

View Entire Topic
Former Member
0 Kudos

Dear Mr. Vivek.

The cleanipc command is used to clear the shared memeory occupied by the SAP system.

Mostly, this command is used (by <sid>adm user) while restarting an SAP system.

So, you stop the system using stopsap, run the cleanipc command to clear the memory and

then start the system using startsap.

Command: cleanipc <instance_nr> remove

However, sometimes, cleanipc fails to cleanup some semaphores saying: Semaphore Key: XX remove failed **** - errno = 1 (Not owner)

Command: cleanipc 06 remove

In this case, login as root and run the following commands:

ipcs –s | grep “the number from the semaphore”

ipcrm –s “the number from the above command”

The above command ipcrm clears up

the semaphore which was not cleared by cleanipc command when executed by <sid>adm user.

Now, if you run cleanipc again using <sid>adm, you will find that the affected semaphore

is now cleared.

Kind rgds,

Ashwin Mane