This blog post provides a step-by-step guide on how to upgrade the SAP kernel. It also includes information on how to check the current kernel version and choose the right kernel version to upgrade to
The procedure to upgrade the kernel is as follows
Kernel: Kernel can be defined as a set of executables to run the SAP system.
- First of all we need to make sure that the desired SAP kernel version is compatible with the existing OS Kernel version and SAP product versions with the help of product availability matrix (PAM).
- After deciding the target kernel patch, download the DB independent, DB dependent files (SAPEXE_xxx.xxx.SAR and SAPEXEDB_xxx.xxx.SAR) and place them in the target server.
- Create a directory in the target server with the command.
mkdir newkernel
- Copy the DB dependent and DB independent files into the newly created directory.
cp –pr SAPEXE_XXX.XXX.SAR SAPEXEDB_XXX.XXX.SAR /newkernel
- Extract the files using SAPCAR executable. (It can be downloaded explicitly or the existing one on the server can be used).
./SAPCAR.EXE –xvf SAPEXE_XXX.XXX.SAR ./SAPCAR.EXE –xvf SAPEXEDB_XXX.XXX.SAR
- Once the files are extracted assign the suitable authorization and permissions for the executables.
chown –R <sid>adm:sapsys * chmod –R 755 *
- Now stop the application services and make sure that there are no processes running with <sid>adm user.
- Take a consistent backup from the global directory. (Make sure to take the backup from the global directory as the backups
taken in the local directories would be overwritten by the kernel in the global directory and in such cases reverting the
kernel will not be possible). - Copy the newly extracted kernel to the global directory from the extracted path.
cp –pr * /sapmnt/<SID>/exe/uc/linuxx86_64
- Once the kernel is copied, check the kernel version using the executable “disp+work”.
- Run the command
./saproot.sh <SID>
from the global directory. (This command assigns the desired ownership and
permissions to the executables such as br**, sapuxuserchk, icmbnd etc.). - Once the checks are done, we can start the SAP instance.
- The SAP instance copies the kernel from the global mount-points to the local mount-points and application directories using
the backend program “sapcpe” to all the application servers. - Once the instance is up and running, validate the kernel version from the application layer as well.
Note:
1. Only the SAPEXE_XXX.SAR file is required to kernel upgrade for a web-dispatcher or diagnostic agent.
2. The kernel is copied from the global directory to the local directories and application specific directories which are as below. Global: /sapmnt/<SID>/exe/uc/linuxx86_64
Local: /usr/sap/<SID>/SYS/exe/uc/linuxx86_64 Application: /usr/sap/<SID>/D**/exe
3. There may be situations when the kernel version is not reflecting at the application layer, we may have to copy the
executables manually to the local directories and application specific directories
4. If the applied Kernel has compatibility issues with the OS kernel version or SAP products installed, it can be traced out in the work directory logs. (This happens only in cases when the compatibility is not checked in the product availability matrix prior to doing the kernel upgrade).
5. There are other upgrades such as tp, igs.. and other executables which can be explicitly upgraded in the same fashion
as per the requirement or as a workaround to the current problem being faced.