Upgrading the SAP kernel is a crucial maintenance task for SAP Basis administrators. It involves replacing the core executable files of the SAP system, which can bring new functionalities, performance improvements, bug fixes, and security updates. This process typically requires system downtime.
Here's a detailed breakdown of the SAP kernel upgrade steps:
I. Pre-requisites and Planning:
-
Understand Kernel Versions and Compatibility:
- SAP kernel versions are tied to SAP NetWeaver/S/4HANA releases and specific operating systems and databases.
- Crucially, check the Product Availability Matrix (PAM) on the SAP Support Portal (
) to ensure the target kernel version is compatible with your current SAP product version, OS, and database.service.sap.com/pam - Identify if your system uses a Unicode or Non-Unicode kernel. This determines which SAR files you need to download.
-
Check Current Kernel Version:
- In SAP GUI:
- Go to transaction
SM51
-> Release Notes. - Go to
System
->Status
-> Click on "Other Kernel info".
- Go to transaction
- At OS Level (as
<sid>adm
user):- Run
disp+work
ordisp+work -version
- Run
- In SAP GUI:
-
Download Necessary Kernel Files from SAP Support Portal:
- Log in to
service.sap.com
with your OSS ID and password. - Navigate to
Downloads
->SAP Support Packages
->Entry By Application Group
->SAP Kernel
. - Select the appropriate kernel version (e.g., 7.53 64-bit).
- Choose your Operating System (Windows, Linux, AIX, Solaris, HP-UX) and Database.
- You will typically need to download two main
.SAR
files:SAPEXE_<patch_level>-<GUID>.SAR
: Contains database-independent executable programs.SAPEXEDB_<patch_level>-<GUID>.SAR
: Contains database-dependent executable programs (specific to your database like Oracle, HANA, SQL Server, etc.).
- You might also need
SAPCAR.EXE
if you don't have an up-to-date version on your system.
- Log in to
-
Review SAP Notes:
- Always search for and review relevant SAP Notes related to the specific kernel patch you are applying. These notes often contain important information, known issues, and specific instructions.
-
Plan Downtime:
- Kernel upgrades require stopping the SAP application, so plan for a maintenance window with minimal impact on users. The database usually does not need to be shut down, but the SAP application must be stopped.
II. Pre-Upgrade Steps:
-
Create a New Directory for the New Kernel:
- At the OS level, create a new directory with enough space to extract the kernel files. A common naming convention is
exe_new<ddmmyy>
(e.g.,exe_new20250620
). - Example (Linux/Unix):
Bash
cd /sapmnt/<SID> mkdir exe_new<ddmmyy>
- At the OS level, create a new directory with enough space to extract the kernel files. A common naming convention is
-
Transfer Downloaded SAR Files:
- Copy the downloaded
SAPEXE.SAR
andSAPEXEDB.SAR
files (andSAPCAR.EXE
if needed) to the newly created directory.
- Copy the downloaded
-
Extract Kernel Files:
- Navigate to the new directory (e.g.,
cd /sapmnt/<SID>/exe_new<ddmmyy>
). - Use
SAPCAR
to extract the SAR archives. - Example:
Bash
SAPCAR -xvf SAPEXE_<patch_level>-<GUID>.SAR SAPCAR -xvf SAPEXEDB_<patch_level>-<GUID>.SAR
- Verify that the files have been extracted successfully.
- Navigate to the new directory (e.g.,
-
Backup the Existing Kernel:
- This is a critical step for rollback purposes.
- Create another new directory to store the backup of your current kernel (e.g.,
exe_old<ddmmyy>
). - Copy (do not move) the entire content of your current kernel directory (typically
/sapmnt/<SID>/exe
on Unix/Linux or\usr\sap\<SID>\SYS\exe\run
on Windows) to this backup directory. - Example (Linux/Unix):
Bash
cd /sapmnt/<SID> mkdir exe_old<ddmmyy> cp -rp /sapmnt/<SID>/exe/* /sapmnt/<SID>/exe_old<ddmmyy>/
- Ensure the backup is complete and accessible.
III. Kernel Upgrade Execution (Downtime Phase):
-
Stop SAP Application:
- As
<sid>adm
user, stop the SAP system. - Example:
stopsap r3
- Verify that all SAP processes are stopped (e.g., using
ps -ef | grep <sid>adm
on Unix/Linux or Task Manager on Windows). - Also stop
saposcol
(if running separately):saposcol -k
- As
-
Copy New Kernel Files to Active Directory:
- Navigate to the new kernel directory (e.g.,
/sapmnt/<SID>/exe_new<ddmmyy>
). - Copy the extracted new kernel files from this directory to the active kernel directory (
/sapmnt/<SID>/exe
on Unix/Linux or\usr\sap\<SID>\SYS\exe\run
on Windows). - Important: Overwrite the existing files. Do not delete the target directory and then copy. Simply copy and let it overwrite. This ensures that any files not present in the new kernel patch but required by the system remain.
- Example (Linux/Unix):
Bash
cp -rp /sapmnt/<SID>/exe_new<ddmmyy>/* /sapmnt/<SID>/exe/
- Navigate to the new kernel directory (e.g.,
-
Run
saproot.sh
(for Unix/Linux systems):- Switch to the
root
user. - Navigate to the active kernel directory (
/sapmnt/<SID>/exe
). - Execute
saproot.sh <SID>
. This script assigns correct permissions to critical SAP executables (likebr*
,sapuxuserchk
,icmbnd
). - Example:
Bash
cd /sapmnt/<SID>/exe ./saproot.sh <SID>
- If using an Oracle database, you might also need to run
oraroot.sh
.
- Switch to the
-
Start SAP Application:
- Switch back to
<sid>adm
user. - Start the SAP system.
- Example:
startsap r3
- Monitor the startup process for any errors in the
dev_w*
files (in the work directory,/usr/sap/<SID>/<Instance>/work
).
- Switch back to
IV. Post-Upgrade Steps and Verification:
-
Verify New Kernel Version:
- At OS Level (as
<sid>adm
):- Run
disp+work
ordisp+work -version
. The patch level should reflect the newly applied kernel.
- Run
- In SAP GUI:
- Log on to the SAP system.
- Go to transaction
SM51
-> Release Notes. - Go to
System
->Status
-> Click on "Other Kernel info". - Check
SM52
if applicable for updated kernel information.
- At OS Level (as
-
Check SAP System Health:
- Monitor
SM21
(System Log) for any new errors or warnings. - Check
ST22
(ABAP Dumps) for any new dumps. - Verify that all work processes are running (
SM50
). - Check application services like Message Server, Dispatcher, etc.
- Perform a quick functional test of critical transactions.
- Monitor
-
Clean Up (Optional but Recommended):
- Once you are confident the new kernel is stable, you can delete the
exe_new<ddmmyy>
directory. - Keep the
exe_old<ddmmyy>
backup directory for a predetermined period (e.g., 1-2 weeks) in case a rollback is needed. After that, you can delete it to free up space.
- Once you are confident the new kernel is stable, you can delete the
Important Considerations:
- Rolling Kernel Switch (RKS): For systems with multiple application servers, SAP offers the Rolling Kernel Switch feature which can minimize downtime by upgrading kernel components one by one without stopping the entire system. This is a more advanced procedure and requires careful planning and setup.
- SAPCAR Utility: Ensure you have the latest version of
SAPCAR
for extracting SAR archives. You can download it from the SAP Support Portal. - Permissions: Incorrect file permissions are a common cause of issues after a kernel upgrade. Always ensure the correct user and group permissions are set for the kernel files.
- Documentation: Document every step of the upgrade, including the old and new kernel versions, download paths, backup locations, and any issues encountered.
- Test System First: Always perform kernel upgrades in a development or quality assurance system before applying them to production. This allows you to identify and resolve any potential issues in a non-critical environment.
By following these detailed steps, SAP Basis administrators can perform a kernel upgrade effectively and minimize potential disruptions to the SAP system.
Comments
Post a Comment