0% found this document useful (0 votes)
962 views

Remove Shared Memory of Sap Instance

The cleanipc command is used by the <sid>adm user to clear the shared memory occupied by an SAP system when restarting. It is run after stopping the system with stopsap and before starting it again with startsap. If cleanipc fails to remove some semaphores, the root user can run ipcrm to clear them, allowing cleanipc to fully clean up when run again by <sid>adm.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
962 views

Remove Shared Memory of Sap Instance

The cleanipc command is used by the <sid>adm user to clear the shared memory occupied by an SAP system when restarting. It is run after stopping the system with stopsap and before starting it again with startsap. If cleanipc fails to remove some semaphores, the root user can run ipcrm to clear them, allowing cleanipc to fully clean up when run again by <sid>adm.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

shared memory clean up ---

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.

To list the shared memory segments:

*******cleanipc 00 show

To remove the shared memory segments:

********cleanipc 00 remove

NB : The number 00 should be replaced with the appropriated system number. If you
have SCS then you need to run against that as well.

You might also like