In this article we will discuss the concept of Rolling Kernel Switch in SAP, how it is achieved,prerequisites and actual procedure.
What is Rolling Kernel Switch?
During the SAP kernel upgrade with multiple application server, we need to:
- Stop all the application servers including PAS.
- Switch the kernel executables
- Restart the application instance.
This traditional approach has major disadvantage as ‘unwanted downtime is required during kernel switch’.
To minimize this downtime, RKS (Rolling Kernel Switch) procedure was introduced.
The order in which instances are restarted are as below:
- ERS (Enqueue Replication Server) is first restarted.
- ASCS instance is started next.
- Application server instances are restarted next in sequence (n, n+1,n+2 and so on).
- As a last step, instance defined last with its start service is started with new kernel version.
As of 7.4x releases, an automatic RKS procedure is provided.
For 7.2x kernel releases, manual procedure exists.
Please refer SNOTE: 953653 for manual procedure on release 7.2x.
We will focus on the Automatic RKS procedure in this blog article.
Prerequisites for Rolling Kernel Switch procedure:
- To enable RKS procedure, Enqueue server and message server must be located on the separate instances.
This instace host must not contain any application server (ABAP SAP Central Services, ASCS )
Why it is mandatory?
This is because, for RKS procedure to be effective we must be able to stop/start individual application servers without affecting availability of any other instances.
In conventional SAP ABAP systems, where application server is with central services enqueue and message server exists,this procedure will NOT work .
- As of 7.4x version, RKS procedure does not support any DUAL stack or JAVA stack systems.
- Avoid long running background jobs when RKS is scheduled.
- Use logical spool server instead of application server which can be defined in SPAD to avoid any print failure during this activity.
- Use local IGS services as this service might get stopped/restarted .
- If we are using update server groups,we should check if each group is RKS compatible.
We can verify this by checking if UPD work process exists for all/ at least 2 application servers in the group.
- VMC must be active in at least two AS ABAP instances or in none.
- RFC’s must be configured with load balancing,if single host is used, chances are to get them failed.
- Backup DIR_CT_RUN in we want to import new kernel patch.
- Download relevant SAPEXE.SAR and SAPEXE<DB>.SAR archives and extract them in DIR_CT_RUN (central executable directory) using SAPCAR. (Refer SNOTE:19466).
- Source and target versions kernels must be RKS compatible.
It can be checked by using below command or via SM51 release notes info:
Profile Parameter Settings In Context of RKS
Below are the profile parameters related to RKS configuration in SAP.
|Describes how load balancing is performed during the RKS procedure.
unmodified:New logons are distributed across instances that still have to be restarted as well as instances that have already been restarted.
Prefer_restarted:The preferred option is to forward new logons to instances that have already been restarted.
|Specifies the maximum length of time the server startup procedure can last for while the application server instance is restarting. If this value is exceeded, the server startup procdure is terminated.
|stores additional information during the server startup procedure. Do not change the file name
|Specifies whether the server startup procedure is to be run while an ABAP application server instance is starting up
|Specifies the ABAP user with which the server startup procedure is run.
We can start RKS with multiple tools:
- via SAP MMC
- via command line
SAP MMC Method:
In SAP MMC, right click–>choose Check Prerequisites option to get the automatic checks done.
All checks should be successful. If not,please fulfill the conditions:
Now choose Update system option as shown below:
We will get the popup for TIME OUT value.
This value should be greater than rdisp/server_startup/max_time (default 1Hour)
Command Line Method :
We can start RKS procedure using sapcontrol in command line.
Login with <SID>adm.
Use below command syntax to proceed with this method:
sapcontrol -nr <NR> -function UpdateSystem <waittimeout sec> <softtimeout sec>
We can monitor procedure via multiple ways:
- via SAP MMC
- command line
Monitor instance status: scheduled/started/stopping.
Alternatively we can achive this via command line as shown below:
sapcontrol -nr <NR> -function GetSystemUpdateList
If any users are using app server which is being restarted, they are notified to use another app server after specified wait time inn parameter rdisp/shutdown/gui_auto_logon.
Here we can monitor the instance status for each application server.