SAP Kernel Upgrade in Distributed System

What is the kernel of an SAP system?

The kernel is a central program that acts as an interface between the SAP application and operating system.
These files help startup the R/3 system, initialize the memory, create buffers and start managing the requests from users and effectively utilizing of hardware resources.
The kernel is also responsible for starting and stopping all the application services like dispatcher, message server, collector, etc.

Why Kernel Upgrade?

SAP Kernel is the core of the application. Like all other applications, the Kernel contains the executable files (.EXE files for stating various processes in SAP).
The Kernel is the heart of the operating system. It contains those files which are used to run every event in SAP. E.g.|: starting database, shutdowns of the database, starting sap, shutdown of sap, saposcol, to uncar the sap files etc.
That's the reason why when a Kernel upgrade is done it means new versions of the various EXE files replace the older versions.

How to check Kernel Version?

1.Go to SM51 à click on Release Notes
2. Logon to SAP system and go to System tab in the menu bar and select Status
You can also give disp+work –version
3. Logon in operating system, switch to user <SID>adm and give the command disp+work

How to download Kernel files:

Go to "SAP Service Marketplace. " (https:\\service.sap.com) You will need your OSS ID and password.
Then go to Downloads à SAP Support Packages à By Alphabetical Index (A-Z) -> Letter Kà SAP Kernel 64 Bit Unicode à Select your OS (LINUX/WINDOWS/SOLARIS/AIX) then download

1) Database Dependent and (Ex: brtools,R3load etc.)

2)Database independent (Ex:R3trans,tp,saprouter etc.)
Two SAR files SAPEXE.SAR and SAPEXEDB.SAR are downloaded from Service Marketplace



Normally each system has a so-called SAPGLOBALHOST which is shared by all instances system-wide. The kernel files of all relevant platform combinations reside on this host under the directory ///exe. Each host in the system cluster mounts this global directory to its file system beside the instance-individual directories which are depicted with the left branch in the graphic. The system directory /usr/sap/SYS is shared by all instances on the host and maintain links to the global host so that all instances can access the global host via the links. Each instance on the host points to a subdirectory beneath the system directory with the instance-specific parameter DIR_CT_RUN (Central directory for executable files and programs).

When an instance starts, a bootstrap program called SAPCPE which itself is a kernel program comes into play first. The job of SAPCPE is to compare the binaries in the local-instance executable directory with the DIR_CT_RUN. If new versions of the relevant files are available in DIR_CT_RUN, it copies them to instance’s executable directory. In this way, new kernel updates are distributed to the instances.


Run SAPCPE For Application Server:

sapcpe pf=/usr/sap/<SID>/SYS/profile/<Application Server InstanceProfile>

for Application server also,SAPCPE will do same work but now it’ll copy Global Exe kernel files from /sapmnt/SID/exe to /usr/sap/SID/D00/exe/ (application server local exe folder)

Procedure to update the SAP kernel on all systems.

· Check the value of DIR_CT_RUN in the CI.

· Unpack the kernel patch files SAPEXE.SAR and SAPEXEDB.SAR to a temporary directory.

· Stop all the SAP system with all the instances and all OS-level services of all instances.

· Backup the kernel that is in the path of the DIR_CT_RUN parameter.

· Use under AIX only if necessary the system command /usr/sbin/slibclean (as roots) around old versions of the Shared LIBRARIES from main storage to remove (see also note 162843)

· Copy the new kernel from the temporary directory to the directory indicated by the parameter DIR_CT_RUN.

· The DIR_CT_RUN of the central instance is linked to the corresponding directory on the global host which is accessible from all hosts in the cluster; the updates will be distributed by SAPCPE when the instances start.

· Restart the SAP system.

                            OR

EXTRACTION, UPDATE



1) Change to profile folder:


2) Find the instance profile

3) Find DIR_CT_RUN by "sappfpar pf=<instance pf with full path>"


4. Copy SAR files one level above, in this case to "/usr/sap/<SID>/SYS/exe/uc":


5. Copy kernel folder, in this case copy linuxx86_64 as linuxx86_64.bak:


6. Copy SAPCAR to the current folder:


7. Stop SAP at this point. Also stop sapstartsrv processes of this SAP system. Refer to Starting and Stopping SAP Systems Based on SAP NetWeaver

8. Extract kernel archives by "sapcar -xfj <SAR archive> -R <destination folder>". First extract SAPEXE and SAPEXEDB SAR files and then the rest (dw sar, lib_dbsl sar, etc):



9. Change permission and owner of kernel files as root by "chmod -R 755 <kernel folder>/*" and "chown -R <sid>adm:sapsys <kernel folder>/*":



10. Run saproot.sh "<kernel folder>/saproot.sh <SID>" as root:


11. Start SAP by "startsap r3" as <sid>adm (deprecated) or by sapcontrol; refer to Starting and Stopping SAP Systems Based on SAP NetWeaver
CHECK AFTER

Check the new kernel version:

1. System > Status:



2. Operating system level:



Interview Questions :

PROBLEM 1:we generally forgot about file permissions

PROBLEM2: we should stop saposcol & listener otherwise, it gives problems.


Comments

Popular Posts

Interview Questions

EHP Upgrade (SUM)

SAP Logon Configuration(Load Balancing)

SAP Startup Troubleshooting

HANA Installation & upgrade

SAP HANA Backup

SAP Transport Management System (STMS)

Set Up SAP HANA System Replication with hdbnsutil

SAP Client Copy