How to do Kernel Upgrade


A kernel is a central program which acts as an interface between SAP application and OS. The kernel consists of executable programs, these executable’s resides in /sapmnt/<SID>/exe (UNIX) or /usr/sap/<SID>/exe/run (Windows).

These files comes into picture while the SAP system starts up for initializing memory, creation of buffers and hardware utilization.

Importance of Kernel Upgrade

Kernel is the heart of operating system, it is used for start and stop of database, SAP, Saposcol etc.

Kernel contains numerous amount of executable’s. For upgrading these executable’s to newer versions Kernel Upgrade is required.

Steps to do Kernel Upgrade in UNIX environment:

1. Put out system message 5 to 10 min before taking the system down asking everyone to finish their tasks and log out of the system, as it will be going down for maintenance.

2. Stop sap and db2

  • Log Into the system as the sap administrator
  • Run stopsap_sap<sid>_<instance-no> to stop SAP and the Database.

3. Stop the OS collector by running saposcol –k

4. Clean Memory by running cleanipc <instance-no> remove

5. Login as root to remove segments

  • Run: ipcs| grep sap

Ex/ ipcs | grep sap

m 131091 0x00004dbe — rw-rw- rw- root sapsys

ipcrm –m 131091

  •  Remove the segment: 0x00004dbe by running ipcrm –m [number]

6. As root change permissions and file assignments

  • In /sapmnt/<SID>/kernel_new directory ensure that files have the following permissions. And assignments:19


  • To alter the permissions use chmod [u/g/w] [+/-] [rwxs]
  • To alter assignment use chown <username>: <groupname><filename>

7. Copy kernel directories

  • Go to /sapmnt/<SID>
  • Move old kernel directory: mv exe exe_old
  • Move new kernel directory: mv kernel_new exe

8. As root run

  • Go to home directory of sap admin account cd /home/<sid>adm
  • Enter csh at the prompt
  • A pound sign prompt should appear, execute the following commands:


  • You should now be kicked out of the csh shell (# prompt)
  • Enter: cdexe
  • Enter: ./ <SID>

9. Start SAP as sidadm

  • Use: startsap_sapsid_00 to start the system

10. Upgrade dbtools

  • Log into the system as root
  • goto: /db2/SID
  • Enter the C-shell by typing csh
  • Run the commands:


  • At the standard prompt enter cdexe
  • Run: ./sddb6ins –i at the prompt

11. Log into SAP and ensure saposcol is running

  • Transaction: st06
  • Click on OS collector button
  • Ensure that the collector is active

12. Copy some old kernel files back

  • cp /sapmnt/SID/exe_old/opti* /sapmnt/SID/exe
  • cp /sapmnt/SID/exe_old/pag* /sapmnt/SID/exe
  • cp /sapmnt/SID/exe_old/sapccm4x /sapmnt/SID/exe

13. ORT the System.


If you must back out the changes:

1. Stop SAP and DB2, Stop Oscollector, and run saposcol –c, clean memory

2. as root, cd to /sapmnt/SID

3. mv exe kernel_new

4. mv exe_old exe

5. start sap

6. ORT


To bolster your SAP implementation knowledge, stay connected with us.

We are the Geeks!!!GeekPandit!!!

Leave a Reply

Your email address will not be published. Required fields are marked *