SAP Kernel
The SAP Kernel is the core set of executables and libraries that enable the SAP system to communicate with the
operating system and database. It acts as the runtime environment for all ABAP programs and system processes.
Understanding the SAP kernel is crucial for BASIS administrators, especially for tasks like upgrades, patching,
performance tuning, and troubleshooting.
🔧 1. What is SAP Kernel?
The SAP Kernel is a collection of compiled C/C++ executables that run on the host operating system. It provides the
runtime environment for ABAP programs and facilitates:
Communication between application server and OS/DB
Execution of SAP work processes (dialog, update, background, etc.)
Internal processes like buffering, memory management, and lock management
🧱 2. SAP Kernel Components
Key components and executables within the kernel directory (/usr/sap/<SID>/SYS/exe/run or
exe/uc/<platform>):
Component Description
disp+work Dispatcher and work process manager
msg_server Message Server for communication between instances
gwrd Gateway process for RFC and external communication
igswd Internet Graphics Server
sapstartsrv SAP Start Service – used for instance management
r3trans Tool for transport management and DB connection testing
tp Transport tool interface to r3trans
sapcpe Tool to copy kernel files during startup
icman ICM process (for HTTP, HTTPS, SMTP, etc.)
dboraslib, dbhdbslib, etc. Database-dependent libraries for Oracle, HANA, etc.
📂 3. Important Kernel Directories
Directory Description
exe Contains main kernel binaries
exe/uc/<platform> Unicode-specific executables for the platform
run Often symlinked to the correct uc directory
work Work directory containing dev traces, logs
profile Instance profile and startup configuration
Directory Description
igs Internet Graphics Server files
📌 4. SAP Kernel Versions
SAP releases kernel patches and major kernel versions aligned with NetWeaver or S/4HANA releases. For
example:
7.22, 7.42, 7.45, 7.49, 7.77, etc.
Different versions support different SAP NetWeaver releases
Kernel 7.89 supports newer S/4HANA 2023+ systems
Use disp+work -version to check the kernel version:
🔁 5. Kernel Upgrade Types
Standard Kernel Upgrade: Replacing all kernel executables with a newer patch level
Downward-Compatible Kernel (DCK): Newer kernel that runs older SAP releases (within compatibility
limits)
Switch Kernel: Used temporarily during upgrade (e.g., during SUM runs)
🛠️6. Kernel Upgrade Steps (High-level)
1. Download kernel files from SAP Software Download Center
2. Take system backup and stop SAP
3. Backup old kernel directory (exe and run)
4. Replace with new kernel files
5. Adjust ownership and permissions
6. Start SAP and validate with disp+work -version
📈 7. Kernel & Performance
The kernel is tightly linked with:
Memory management (EM, HEAP, PAGING areas)
Work process behavior (dialog, update, enqueue, spool)
Shared memory segments
CPU/memory usage
Communication with the DB (via DBSL)
Performance bottlenecks can sometimes be resolved by updating to a newer kernel with optimized code.
🧪 8. Useful Kernel Troubleshooting Tools
Tool Use
dev_disp, dev_w0... Trace files for dispatcher/work processes
Tool Use
r3trans -d Check DB connectivity
tp Manage and test transports
sapcontrol Manage instance status and processes
sm50 / sm66 Monitor active work processes
ST06, ST04, SM21 System stats, DB performance, logs
🔐 9. Kernel & Security
Older kernels may contain vulnerabilities (buffer overflow, DoS)
Kernel patching is essential for security compliance
Newer kernels often introduce support for updated encryption standards (e.g., TLS 1.2/1.3)
📚 10. Tips for BASIS Administrators
Always test kernel patches in QAS before applying to PRD
Keep track of SAP Note dependencies during patching
Ensure proper kernel architecture (Unicode, 64-bit) for your system
Avoid mixing old tp, r3trans, and new kernel binaries
✅ A. Step-by-Step SAP Kernel Upgrade Procedure (with screenshots - optional)
1. Pre-requisites
Download latest kernel from SAP Support Portal (SWDC)
Note down current kernel version using:
disp+work -version
Backup the current kernel:
cp -rp /usr/sap/<SID>/SYS/exe/run /usr/sap/<SID>/SYS/exe/run_backup_$(date +%F)
2. Stop SAP System
sapcontrol -nr <inst_no> -function StopSystem ALL
3. Replace Kernel Files
Navigate to the kernel download directory
Extract the SAR files using SAPCAR:
SAPCAR -xvf SAPEXE_XXXX.SAR
SAPCAR -xvf SAPEXEDB_XXXX.SAR
Copy files to:
/usr/sap/<SID>/SYS/exe/run
4. Set Ownership
chown -R <sidadm>:sapsys /usr/sap/<SID>/SYS/exe/run
5. Start SAP
sapcontrol -nr <inst_no> -function StartSystem ALL
6. Validate Kernel Version
disp+work -version
🧾 B. Sample SAP Kernel Upgrade Checklist
Task Status
Backup current kernel ✅
Download latest supported kernel from SWDC ✅
Extract .SAR files using SAPCAR ✅
Stop SAP system ✅
Replace binaries and check permissions ✅
Start SAP and verify system logs ✅
Run disp+work -version ✅
Test important T-codes and jobs ✅
🔍 C. Common Kernel Troubleshooting Scenarios
Symptom Cause Resolution
R3trans -d fails Kernel-DB mismatch Re-check dboraslib, dbhdbslib, etc.
dev_disp shows segmentation fault Incompatible kernel Rollback to previous version
Dispatcher not starting Incorrect ownership Set proper sidadm permissions
Enqueue errors Shared memory issues Reboot host or clean up shared memory
sapcontrol shows gray status Kernel corruption Reinstall clean kernel
🔧 SAP Kernel Upgrade – Full Procedure (Linux & Windows)
📁 1. SAP System Architecture (Components)
Component Description
ASCS / SCS Central services: Enqueue and Message Server
PAS Primary Application Server (includes dispatcher, work processes)
AAS Additional Application Server
You must upgrade ASCS kernel first, then PAS, then each AAS, since ASCS manages locking and messaging.
🖥️Step-by-Step SAP Kernel Upgrade
🔄 A. General Pre-Steps (All Platforms)
1. Download Kernel Files
o Go to SAP Software Download Center
o Download:
SAPEXE_<ver>.SAR
SAPEXEDB_<ver>.SAR
Latest SAPCAR utility
2. Check Current Kernel Version
3. Backup Current Kernel Directory
(For Windows: simply copy exe folder using File Explorer)
📦 B. Kernel Upgrade – ASCS / SCS Instance
Always start with ASCS, as it contains the Enqueue and Message Server.
🔧 Linux
🪟 Windows
Stop ASCS from SAP Management Console (SAP MMC)
Backup exe directory under usr\sap\<SID>\SYS\exe\run
Extract SAR files using:
SAPCAR.EXE -xvf SAPEXE_*.SAR
SAPCAR.EXE -xvf SAPEXEDB_*.SAR
Replace files in exe\run
Restart ASCS via SAP MMC
🚀 C. Kernel Upgrade – PAS & AAS Instances
Upgrade one PAS and all AAS instances after ASCS.
🔧 Linux
Repeat steps on each PAS/AAS host:
🪟 Windows
Stop PAS/AAS via SAP MMC
Backup exe\run
Extract kernel files using SAPCAR
Replace kernel files in run directory
Restart instance via MMC
✅ Post-Upgrade Validation (All Platforms)
Check Command
Kernel version disp+work -version
DB connectivity r3trans -d
System logs SM21, ST22
Work process status SM50
Enqueue locks SM12
Spool, Background Jobs SP01, SM37
📌 Additional Notes
Upgrade each instance individually (ASCS → PAS → AAS)
Use identical kernel version across all systems
Keep track of SAP Notes related to the kernel version
Clustered/HA systems need extra coordination
🛡️SAP Kernel Upgrade in Clustered / HA Systems
Applies to:
✔ SAP ASCS/SCS in HA (Windows Cluster or Linux Pacemaker)
✔ Shared file system (/usr/sap/<SID>/SYS or Windows shared volume)
✔ Failover setup between Node-A and Node-B
🧱 1. Understanding the Setup
Component Location Behavior
Kernel Directory Shared FS (/usr/sap/<SID>/SYS/exe/run) Common across all cluster nodes
SAP Start Service Local Runs on both nodes independently
ASCS/SCS Instance Active on one node Passive on other node(s)
PAS/AAS Local on each node Non-clustered usually
🟡 2. Pre-Upgrade Tasks
✅ Identify the active ASCS node using sapcontrol or cluster management UI
✅ Download:
o SAPEXE_<ver>.SAR
o SAPEXEDB_<ver>.SAR
o SAPCAR
✅ Backup kernel:
🔁 3. Kernel Upgrade – Active ASCS Node (Windows or Linux)
Perform the upgrade only on the active node while ASCS is stopped and the shared kernel filesystem is mounted.
Step-by-Step:
1. Stop the ASCS Instance (not the cluster resource):
2. Upgrade the Kernel
3. Check version
4. Start ASCS again
🔄 4. Switchover & Validate Passive Node
Once the ASCS is updated and working fine on Node-A:
1. Use cluster manager (e.g., pcs or Windows Failover Cluster Manager) to failover ASCS to Node-B
2. Once ASCS is active on Node-B:
o Log into Node-B
o Run:
It should reflect the same new kernel version since the exe/run is shared
o
3. Optional: Upgrade local tools like r3trans or sapcar in %PATH% or /usr/bin/
🧠 5. PAS and AAS Upgrade (Node Local)
PAS and AAS have local kernel directories. Upgrade them individually on each node.
Steps (repeat per server):
1. Stop instance (via sapcontrol or SAP MMC)
2. Backup local exe\run directory
3. Extract kernel SARs
4. Replace local kernel files
5. Start instance
6. Run disp+work -version
✅ 6. Post-Upgrade Checklist
Checkpoint Tools
Kernel version match disp+work -version on all nodes
Transport test r3trans -d
Enqueue locks & replication SM12, ensmon, enqt
System logs SM21, dev traces
Cluster failover test HA tools
Background jobs, spool SM37, SP01
⚠️Notes for HA Environments
Never upgrade kernel on both nodes simultaneously
Don’t manually stop the cluster resource; stop only the SAP instance
Ensure shared directories (like /usr/sap/<SID>/SYS) are mounted before upgrade
Some HA setups require sapcpe to sync kernel binaries to local dirs — check start profile
✅ What is SAP Kernel?
SAP Kernel is the core component of the SAP system that contains the executable files.
These files run at the OS level and act as an interface between the SAP Application layer and the
Operating System.
They are responsible for handling system connections and executing SAP programs.
Without the kernel, the SAP system cannot function.
🧠 Importance of SAP Kernel
📌 The core component of any SAP system is the SAP Kernel.
Every time you start or run SAP, it uses kernel executables like disp+work, msg_server, gwrd, etc., to
manage processes and communication.
Kernel executables determine work process management, memory allocation, buffer handling,
communication, and database interaction.
❓ What is EXT in SAP Kernel?
EXT stands for Extended Kernel.
SAP releases EXT kernels to support newer OS/compiler versions when the old (non-EXT) ones are no
longer supported by the vendor.
Example:
o If older OS versions like RHEL 6 become outdated, SAP might compile kernel with RHEL 8 or newer
tools like GCC 10 and release it as EXT.
EXT Kernels help avoid support issues by leveraging modern OS and compiler environments.
📁 SAP Kernel Paths
1. Global Kernel Path
This is common for all instances of an SAP system.
Example:
/sapmnt/DEV/SYS/exe/uc/linuxx86_64
2. Local/Instance Kernel Path
This is the kernel copied specifically to an instance.
Example:
🧪 UNIX/LINUX Behavior
When SAP starts, it copies the kernel from global location (/sapmnt/...) to the local instance directory
(/usr/sap/...).
The instance uses the local kernel for running its processes.
🔍 Screenshot Analysis
Global Kernel – /sapmnt/DEV/exe
This is the central kernel repository shared by all application servers.
Example files:
o disp+work: Main dispatcher and work process binary.
o msg_server: Message server.
o gwrd: Gateway process.
o saposcol: SAP OS Collector.
Instance Kernel – /usr/sap/DEV/DVEBMGS00/exe
Each instance has its own copy of kernel files.
Used by the instance during runtime.
Contains similar binaries to the global kernel, but used locally per instance.
🧰 Common Kernel Executables:
File Description
disp+work Dispatcher & work process handler
msg_server Message server for load distribution
gwrd Gateway for RFC communications
saposcol OS collector for CPU/memory/disk info
R3trans Transport tool for moving SAP data
tp SAP transport control program
📌 Summary
Concept Description
SAP Kernel Core of SAP system managing low-level operations
EXT Kernel Extended kernel built with modern OS/compiler versions
Global Kernel Located in /sapmnt/<SID>/SYS/exe/..., shared among all instances
Local Kernel Located in /usr/sap/<SID>/<Instance_ID>/exe, used by each specific instance
Update Reason Kernel is updated for bug fixes, compatibility, or OS/compiler upgrades
✅ EXT vs NON-EXT Kernel in SAP
Feature EXT Kernel NON-EXT Kernel
🔧 Compiler & OS Support Built with newer compilers & OS versions Built with older compilers & OS versions
⌛ Support Duration Supported for longer period Support may expire earlier
🛠️Maintenance Actively maintained for latest platforms Legacy; may lack support from vendors
🚀 Performance May show performance improvements Standard; optimized for older systems
🔁 Use Case Systems on modern OS versions Systems still using older OS/compiler versions
🔧 Upgrade Recommendation SAP often recommends EXT for upgrades Not preferred for new installations
🔄 SAP Kernel Upgrade Steps (Linux/UNIX/Windows)
✅ Applies to ASCS/SCS, PAS, AAS | Includes HA/Cluster preparation | Both EXT and NON-EXT supported
🔍 Pre-Checks
Step Task
1️⃣ Check current kernel version using disp+work -version
2️⃣ Confirm OS and architecture (uname -a or System Info in Windows)
3️⃣ Download matching EXT or NON-EXT kernel from SAP Support Portal
4️⃣ Backup current kernel directories:
/sapmnt/<SID>/SYS/exe/uc/<platform>
/usr/sap/<SID>/<Instance_ID>/exe
📂 Directory Structure to Know
Location Purpose
/sapmnt/<SID>/SYS/exe/uc/<platform> Global kernel (source of updates)
/usr/sap/<SID>/<Instance_ID>/exe Local/Instance kernel (copied at start)
⚙️Kernel Upgrade Steps (Offline Method)
Do this during maintenance window. Use SAPCAR and SAPEXE & SAPEXEDB archives.
1. Stop SAP System
2. Backup Kernel Directory
3. Extract New Kernel Files
Use SAPCAR to extract:
➡️Place these extracted files into:
/sapmnt/<SID>/SYS/exe/uc/<platform>
Then copy to:
/usr/sap/<SID>/<Instance_ID>/exe
4. Set Permissions
5. Start SAP System
🧪 Post-Upgrade Checks
Check Command
Kernel version disp+work -version
SAP system status sapcontrol -nr <instance no> -function GetProcessList
OS-level monitoring top, df -h, etc.
SAP-level monitoring SM50, ST02, SM21, etc.
🔁 High Availability/Cluster Considerations
If in HA Setup (ASCS/ERS or SCS/ERS):
1. Switch to node A.
2. Upgrade kernel on Node A.
3. Failover to Node B.
4. Repeat the upgrade on Node B.
📘 Example Directory Paths
Purpose Path
Global Kernel /sapmnt/DEV/SYS/exe/uc/linuxx86_64/
Purpose Path
Local Kernel /usr/sap/DEV/DVEBMGS00/exe/
Backup /usr/sap/DEV/DVEBMGS00/exe/backup_20250801/
✅ What is SAP Kernel?
SAP Kernel is the central part of the SAP system that contains OS-level executables necessary to run and manage
the SAP application. It is:
OS/DB independent due to variations in:
o OS type (Windows/Linux/Unix)
o Database (HANA, Oracle, etc.)
o Architecture (32/64-bit)
o Unicode vs Non-Unicode
It contains core runtime files such as:
o disp+work, gwrd, msg_server, sapstartsrv, etc.
It may also include:
o 3rd party tools like:
sapgenpse → for SSL/TLS security
sapcrypto.dll or libsapcrypto.so → for cryptographic operations
dbtools → for DB-level tasks
igs, igshelper → for SAP Interactive Graphic Services
saprouter → for secure SAPNet access
🔧 SAP Kernel SAR Files
SAR File Type Description
SAPEXE.SAR OS-independent Contains core runtime executables
SAPEXEDB.SAR DB-dependent Contains DB-specific executables
sapcrypto.sar Optional For secure network communication
dbatools.sar Optional DB administration tools
igs*.sar Optional Interactive graphics tools
saphostagent.sar Optional Host agent for monitoring
🔄 What is SAP Kernel Upgrade?
Kernel Upgrade means replacing the existing SAP kernel executables with newer versions.
This includes updating both:
Global kernel: /sapmnt/<SID>/SYS/exe/uc/<platform>
Local/Instance kernel: /usr/sap/<SID>/<instance_id>/exe
❓ Why is Kernel Upgrade Required?
Reason Description
✅ OS/DB Compatibility Ensures latest compatibility with upgraded OS/DB versions
Reason Description
✅ Support Packages Needed before applying Support Packs, Add-ons, etc.
✅ EWA Recommendation SAP EarlyWatch Alert may advise upgrade
✅ Runtime Issues Fixes deadlocks, update/lock failures
✅ Security Fixes vulnerabilities or obsolete crypto libraries
Older kernel versions (700, 701, 710, 711) are out of maintenance. Latest is 7.22 or 7.89 (for NW 7.5x,
✅ SAP Maintenance
S/4HANA)
🏗️SAP System Architecture Components
🔹 PAS – Primary Application Server
Description
First SAP instance installed on the system.
May include Message Server and Enqueue Work Process if ASCS is not separately installed.
Location
/usr/sap/<SID>/D** → for ABAP/Dual Stack
/usr/sap/<SID>/J** → for Java
🔸 Older versions use: /usr/sap/<SID>/DVEBMGS**
🔹 ASCS / SCS – Central Services Instance
Component Purpose
ASCS ABAP Central Services (Enqueue + Message Server)
SCS Java Central Services (adds Gateway to ASCS)
Mandatory from NW 7.31 onwards
Not directly accessible by end users (no dialog logon)
Important for High Availability (HA)
Paths
/usr/sap/<SID>/ASCS** → ABAP
/usr/sap/<SID>/SCS** → JAVA
🔹 AAS – Additional Application Server
Description
Additional instance of application server to scale the load.
Connects to PAS and DB via Message Server.
Location
/usr/sap/<SID>/D** → ABAP
/usr/sap/<SID>/J** → Java
🔹 Central System
If PAS + DB + ASCS/SCS are on the same host, the system is called a Central System.
🔍 How to Check SAP Kernel & System Information
✅ Method 1: SAP GUI → System → Status
Menu: System → Status
Click on “Other Kernel Info” (magnifying icon)
✅ Method 2: SAP GUI → SM51
Use SM51 transaction → Click on instance → Click "Release Notes"
✅ Method 3: OS-level via disp+work -v
Shows:
Kernel release (e.g., 722_EXT)
Build platform
Unicode/Non-Unicode
Architecture (x86_64)
🔎 Check OS & Kernel Architecture (Bit level)
🔹 At OS Level:
🔹 At SAP Level:
Use report:
Outputs parameters related to:
Architecture
Unicode
Memory
Buffer sizes
Kernel versions
📝 Additional Notes:
Component Meaning
SAP_BASIS 701 SAP NetWeaver 7.0 EHP1
SAP_APPL 604 SAP ECC 6.0 EHP4
These can be checked in System → Status → Component Information
🔧 SAP Kernel Upgrade on UNIX/Linux – Detailed Steps
✅ 1. Pre-Checks (Before Kernel Upgrade)
a) SAP Level Checks:
System → Status in SAP GUI:
Check kernel release, patch level, Unicode status, etc.
SM51 → Release Notes:
Gives version info of all active instances.
b) OS Level Check:
This shows:
Kernel release
Platform (Linux, AIX, etc.)
Unicode/Non-Unicode
Architecture (x86_64)
c) Stop SAP System:
Also stop related services:
SAPOSCOL
sapstartsrv (kill these manually if still running)
All related DB processes (like Oracle Listener, etc.)
✅ 2. Download the Required Files
From SAP Support Portal, download:
SAPEXE_<version>.SAR → OS Independent
SAPEXEDB_<version>.SAR → DB Dependent
Optional:
o sapcrypto.sar
o saphostagent.sar
o dbatools.sar
o igs*.sar
Also download SAPCAR tool for archive extraction.
✅ 3. Extraction and Update
a) Locate Profile Folder:
Use:
This shows the active kernel directory, e.g.:
b) Copy SAR Files & Backup Old Kernel
Place the SAR files and SAPCAR in this directory.
c) Stop sapstartsrv (if still running):
d) Extract Kernel Files
Also extract optional files (like sapcrypto, dbatools, etc.), if required.
e) Change Ownership & Permissions
f) Run saproot.sh Script
This sets special kernel permissions:
✅ 4. Start SAP System
✅ 5. Post-Upgrade Checks
Checkpoint Command/Tool
SAP Level SAP GUI → System → Status
SAP GUI SM51 → Release Notes
OS Level disp+work -version
Kernel Running? DPMON (check if disp+work and WPs are running)
📌 Important Note: sapcpe Program
🔄 When & Why to Use sapcpe:
If you update only the global kernel location:
then local kernel directories (instance-specific) like:
won’t automatically reflect the new executables.
🛠 What is sapcpe?
It is a program used by SAP during system startup to copy updated kernel files from global to local
directories.
✅ Usage Example (Manual Run):
or simplified:
This ensures:
All latest executables are copied to the local path.
Avoids mismatch of kernel files between global and instance.
⚠️Always run sapcpe manually after global kernel upgrade before starting SAP if instance directories weren’t
touched.
📝 Summary
Task Tool/Command
Backup Old Kernel cp
Extract Kernel SAPCAR
Set Permissions chmod/chown
Set kernel rights saproot.sh
Check Kernel Post-Upgrade disp+work, DPMON, SM51
Sync global → local kernel sapcpe
🔧 What is sapcontrol?
sapcontrol is a command-line tool provided by SAP to control and monitor SAP instances (both ABAP and
Java). It can be used to start/stop instances, check the status, retrieve logs, etc. It replaces the older
startsap/stopsap commands.
📌 sapcontrol Binary Location
OS Typical Location
Linux /usr/sap/<SID>/SYS/exe/run/ or $DIR_EXECUTABLE
Windows C:\usr\sap\<SID>\SYS\exe\uc\<NTAMD64>\
👉 You can confirm with:
▶️Start / Stop SAP System using sapcontrol
The syntax is:
✅ Common Functions
Function Description
StartService Starts SAP Service (Windows)
Start Starts SAP instance
Stop Stops SAP instance
GetProcessList Lists processes and their status
GetSystemInstanceList Lists all instances of the system
RestartInstance Restarts the instance
🖥️Examples – Linux
🔹 Start SAP Instance:
🔹 Stop SAP Instance:
🔹 Check Process List:
🪟 Examples – Windows (CMD)
🔹 Start SAP Instance:
🔹 Stop SAP Instance:
🔹 Get Process List:
💡 Run CMD as Administrator for smooth operation.
🔐 Optional: With Credentials
If required (e.g., remote or secured environment):
✅ Check SAP System Status
To get system-wide status:
To get detailed process status:
📄 Tip: Logs and Help
Check sapstartsrv.log in:
o Linux: /usr/sap/<SID>/<Instance>/work
o Windows: C:\usr\sap\<SID>\<Instance>\work
Get all function help:
🔧 SAP Kernel Upgrade on Windows – Step-by-Step Guide
✅ 1. Prerequisites & Checks Before Upgrade
Before proceeding, you need to verify SAP and OS level details, stop relevant services, and ensure backup
readiness.
🔹 SAP Level Checks
1. SAP GUI → System → Status → Component Information
oNote: Kernel release, Patch level, and SAP Basis release
oUseful to compare before vs after upgrade.
2. Transaction Code SM51
o Check kernel release in each application server.
o Note down for reference.
🔹 OS Level Checks
3. Command Prompt (CMD) – check kernel binary version:
Location: C:\usr\sap\<SID>\SYS\exe\uc\NTAMD64\
🔹 Stop SAP System & Related Services
4. Stop SAP System:
o Use SAP MMC → Stop all instances (PAS, AAS)
o Or:
5. Stop Services:
o Open services.msc
o Stop the following (if present):
SAP<SID>_00
SAP<SID>_01 (or other instances)
SAPOSCOL
OracleService<SID> (for Oracle DB)
Oracle<SID>_TNSListener
SAP<SID>_StartService (after SAP is down)
🔽 2. Download the Kernel Files
1. Visit the SAP Support Portal
2. Go to Software Downloads > Support Packages & Patches
3. Search for:
o SAP Kernel → Based on your SAP NW release and OS (e.g., 7.22 Unicode for Windows x64)
4. Download:
o SAPEXE.SAR – Core executables
o SAPEXEDB.SAR – DB-specific executables (e.g., Oracle)
o Optionally:
DBATOOLS.SAR, SAPCRYPTOLIB.SAR
📦 3. Extraction and Update
🔹 A. Change to Profile Directory
Open CMD or PowerShell as Administrator:
🔹 B. Find Profile and DIR_CT_RUN
Check the instance profile (e.g., DVEBMGS00_<hostname>)
Note DIR_CT_RUN (usually: C:\usr\sap\<SID>\SYS\exe\uc\NTAMD64)
🔹 C. Backup Existing Kernel
Before upgrading, backup current kernel:
mkdir C:\usr\sap\<SID>\SYS\exe\uc\NTAMD64_backup
xcopy C:\usr\sap\<SID>\SYS\exe\uc\NTAMD64\*.* C:\usr\sap\<SID>\SYS\exe\uc\NTAMD64_backup\
/s /e /h /y
🔹 D. Copy & Extract SAR Files
1. Copy SAPEXE.SAR and SAPEXEDB.SAR to:
2. Extract using SAPCAR:
Optional:
🔹 E. Start SAP System
Option 1: SAP MMC
Open SAP Management Console
Start SAP<SID>_00, SAP<SID>_01, etc.
Option 2: Using sapcontrol
🔹 F. Restart SAP Start Service
If not already running:
Or via services.msc.
✅ 4. Post-Upgrade Checks
🔹 A. SAP GUI Level
Go to System → Status → Component Info
Confirm new Kernel Release and Patch Level
🔹 B. SM51
Check kernel release across instances (AAS, PAS)
🔹 C. OS Level
From CMD:
Confirm new patch and version.
🔍 Sample Version Output
✅ Summary Checklist
Step Task
1 Backup old kernel directory
2 Stop SAP system and services
3 Download SAR files (SAPEXE, SAPEXEDB, etc.)
4 Extract SAR files using SAPCAR
5 Start SAP using SAPMMC or sapcontrol
6 Check new kernel version in System → Status and via disp+work
🔷 What is SAPCPE?
SAPCPE (SAP Copy Program Executable) is a file synchronization tool used during SAP system startup to copy
the latest executable files (kernel files) from the global directory to the local instance directory.
✅ Purpose:
Ensures all SAP instances (AAS, PAS) run with the same kernel version
Copies necessary executables (disp+work, igswd, etc.) from:
o Global Kernel Directory → $(DIR_CT_RUN) (Shared filesystem)
o To:
o Local Kernel Directory → $(DIR_EXECUTABLE) (Instance-local)
📁 SAPCPE File Locations
File Type Linux (Default) Windows (Default)
SAPCPE
/usr/sap/<SID>/SYS/exe/run/sapcpe C:\usr\sap\<SID>\SYS\exe\uc\NTAMD64\sapcpe.exe
Binary
Global
/usr/sap/<SID>/SYS/exe/run/ C:\usr\sap\<SID>\SYS\exe\uc\NTAMD64\
Dir
Local Dir /usr/sap/<SID>/<Instance>/exe C:\usr\sap\<SID>\<Instance>\exe\
Log File /usr/sap/<SID>/<Instance>/work/sapcpe.log C:\usr\sap\<SID>\<Instance>\work\sapcpe.log
⚙️How SAPCPE Works
1. During instance startup, the SAP Start Service (sapstartsrv) runs sapcpe.
2. It compares timestamps of kernel files in global dir vs local dir.
3. If files are missing or older in the local dir, it copies them.
4. Log is written to sapcpe.log in the work directory.
▶️How to Execute SAPCPE Manually
You can run sapcpe manually in cases like:
Kernel upgrade
Sync errors
Instance-level kernel mismatch
🔹 Syntax:
✅ Example: Linux
/usr/sap/<SID>/SYS/exe/run/sapcpe /usr/sap/<SID>/SYS/exe/run /usr/sap/<SID>/DVEBMGS00/exe
/usr/sap/<SID>/SYS/exe/run/sapcpe.lst /usr/sap/<SID>/DVEBMGS00/work/sapcpe.log
✅ Example: Windows (CMD)
sapcpe.exe C:\usr\sap\<SID>\SYS\exe\uc\NTAMD64 C:\usr\sap\<SID>\DVEBMGS00\exe sapcpe.lst C:\
usr\sap\<SID>\DVEBMGS00\work\sapcpe.log
📃 sapcpe.lst File
The file sapcpe.lst (optional) contains a list of kernel files to be copied.
Default file is in:
o /usr/sap/<SID>/SYS/exe/run/sapcpe.lst
o Or in Windows: C:\usr\sap\<SID>\SYS\exe\uc\NTAMD64\sapcpe.lst
🔹 You can edit this file if you want to control exactly which files to copy.
Sample contents:
If not supplied, all executables in the source dir will be evaluated for copy.
🔍 How to Verify
After executing sapcpe, check:
Look for:
Copied successfully
No copy needed
Error messages
📌 Real-World Scenarios
Use Case Action
Kernel upgrade completed Run sapcpe manually or restart instances to sync new kernel files
AAS not starting or version mismatch Run sapcpe from global dir to AAS local dir
Troubleshooting kernel mismatch Compare file timestamps or hashes before and after sapcpe execution
🔒 Important Notes
SAPCPE is triggered automatically by the start profile during instance start.
Always ensure DIR_CT_RUN is a shared mount across PAS and AAS.
Never copy kernel files manually — let sapcpe handle it.
📘 cdexe – SAP Kernel Directory Shortcut (UNIX/Linux)
🔹 What is cdexe?
cdexe is a shortcut command available in the <SID>adm environment that takes you directly to the SAP
kernel runtime directory.
This command is a part of SAP’s environment setup and is defined in the .sapenv or .sapenv_<hostname>
scripts loaded when you login as <SID>adm.
🔸 Usage:
✅ Step-by-Step:
1. Login as <SID>adm
2. Run:
3. This command will change your current directory to:
(Or another instance-specific exe path, depending on instance name)
4. To verify the path, run:
5. To list all kernel files in the exe directory:
You will see files like:
o disp+work
o sapstartsrv
o igswd.exe
o r3trans
o saproot.sh
o Kernel .so libraries
🔍 Why is cdexe Useful?
Advantage Explanation
✅ Quick navigation No need to type long paths like /usr/sap/...
✅ Environment awareness Automatically navigates to the right instance
✅ Validation Useful before/after a kernel upgrade to check binaries
✅ Permission-safe Avoids manually mistyping sensitive kernel paths
📌 Note:
cdexe is only available after sourcing the SAP environment.
If it doesn’t work, try running:
📝 Example Output:
📘 disp+work Kernel Error After Upgrade – Symbol Not Found
🧾 Overview of the Error
After a kernel upgrade, if you run disp+work and get an error like:
⚠️What It Means
Your kernel file (disp+work) references a shared library or symbol that is missing at runtime.
Most likely causes:
o Kernel files are corrupted or incomplete.
o Wrong environment variables for dynamic library path (e.g., LD_LIBRARY_PATH).
o You are executing disp+work from a different directory than where its required libraries are.
📚 Background Explanation
1. disp+work depends on many dynamic libraries (.so or .sl) to run.
2. When you run it, the OS loader searches for these libraries in:
o The current working directory
o Environment variables like:
LD_LIBRARY_PATH (Linux)
LIBPATH (AIX)
SHLIB_PATH (HP-UX)
3. If it doesn’t find the required library, it throws the relocation/symbol not found error.
🔍 Step-by-Step Check – Validating Kernel Files Before Applying
Here’s how to safely test your new kernel before applying it to the live system:
🪜 Steps to Validate the Kernel Locally
1. Login as adm
Use telnet/ssh and log in as the SAP OS user.
2. Create a Temporary Folder
3. Extract Kernel Files (.SAR)
4. Set Environment to Use This Temp Path
Modify the library path so the kernel loads its libraries from the temp directory:
Check:
5. Run disp+work From Test Folder
✔️If it displays the kernel patch level/version – it means the kernel files are intact and valid.
❌ If it still shows the "symbol not found" error – the kernel is corrupted or improperly extracted.
6. Copy to SAP exe Path
If the test succeeds:
7. Log out
Logout and re-login to reset the modified LD_LIBRARY_PATH.
🔄 Additional Explanation – Role of sapcpe and Environment
🧠 How sapcpe Works:
When SAP instance starts, sapcpe syncs kernel binaries from:
o DIR_CT_RUN = /usr/sap/SID/SYS/exe/run (symlinked to /sapmnt/SID/exe)
To:
o Instance directory: /usr/sap/SID/DVEBMGS00/exe (local exe)
🌐 Importance of Environment Variables:
SAP dynamically loads shared libraries using:
o LD_LIBRARY_PATH (Linux)
o LIBPATH, SHLIB_PATH (AIX, HP-UX)
These must point to the correct kernel library path, else symbols can’t be resolved.
📝 Summary – Best Practices
Area Recommendation
Kernel validation Always test new kernel using temp folder and disp+work
Environment vars Ensure LD_LIBRARY_PATH includes the kernel folder
SAPCAR usage Only extract .SAR files using latest SAPCAR tool
sapcpe check Run manually if needed to sync instance directories
disp+work test Never skip this step before copying to /sapmnt/<SID>/exe
Area Recommendation
📘 SAP Kernel Upgrade – FAQs and Concepts
🔹 Why Do We Need Kernel Upgrade in SAP?
1. ✅ Pre-requisite for Support Package Installation
o Many SAP Support Packages require a minimum kernel version to proceed.
2. 🔧 During OS/DB Upgrade or Patching
o Kernel may need to be updated for compatibility with new OS/DB versions.
3. 🛡️SAP Security & Performance Recommendations
o SAP frequently releases kernel patches to:
Fix bugs
Patch vulnerabilities
Improve performance or stability
🔹 Why Do We Run ./saproot.sh <SID> After Kernel Upgrade?
Grants root-level privileges for critical components:
o SAPOSCOL (SAP OS Collector)
o BRTOOLS utilities (BRCONNECT, BRBACKUP, etc.)
Ensures correct permissions to /usr/sap/<SID> directories and executables.
Enables proper communication with OS-level functions used by kernel binaries.
💡 Run it as root user after replacing kernel binaries:
🔹 Is Database Shutdown Mandatory for Kernel Upgrade?
❌ No, DB shutdown is not always mandatory.
✅ Yes, if you're upgrading DB-specific kernel files, like:
o BRTOOLS
o BRBACKUP, BRARCHIVE, BRCONNECT, BRSPACE
💡 If DB is not shut and files are in use, you may get:
To avoid this:
Either shut down DB, or
Ensure no kernel/DB-related files are being accessed.
🔹 After Kernel Upgrade, R3trans -d Returns Error Code 0012 – How to Fix?
This error indicates SAP can’t connect to the database.
✅ Resolution Steps (For Oracle DB):
1. Start Listener:
2. Login as SYSDBA:
3. Start Database:
4. Retry R3trans check:
Also ensure environment variables (ORACLE_HOME, LD_LIBRARY_PATH) are correctly set.
🔹 What Files to Download for SAP Kernel Upgrade?
Download from SAP Software Download Center (SWDC) under the kernel section:
1. Kernel DB-Independent Files
o SAPEXE_XXXX.SAR
2. Kernel DB-Dependent Files
o SAPEXEDB_XXXX.SAR
3. SAPCAR Utility (for uncompressing .SAR)
o Platform-specific: SAPCAR_XXX.EXE or SAPCAR_LINUX_X86_64.EXE
🔹 Main Difference in Kernel Upgrade Between Windows and Linux
Feature Linux Windows
Permissions Requires root for saproot.sh Uses NTFS ACLs, no script needed
Script Execution Run ./saproot.sh post-upgrade Not applicable
Command Tools bash, cp, mv, chmod, chown Copy/Paste, GUI tools
Start/Stop Services stopsap, startsap, HDB stop SAP MMC or net stop/start
🔹 Command to Extract .SAR Files in SAP
Use the SAPCAR utility to extract kernel or other packages:
-xvf: Extract Verbosely with Filename
Run in the target kernel directory or temporary folder before copying.
✅ 1. In SAP Level Showing Old Version of Kernel
Even after you have upgraded the SAP Kernel, SAP might still show the old version if the kernel files are not
properly copied or loaded in runtime. Here's how to check and correct that:
🔹 Where to Copy the Kernel
You need to ensure the new kernel is copied to both locations:
1. /sapmnt/SID/exe ⟶ This is the central location where all SAP kernel executables are stored.
2. /usr/sap/SID/DVEBMGS00/exe ⟶ This is the instance-specific directory, where the running SAP instance
fetches its kernel binaries.
🔹 How to Copy Kernel Using sapcpe
SAP uses a tool called sapcpe (SAP Copy Program Executables) to distribute kernel files to instance directories
when the system starts.
To manually sync:
pf= specifies the profile file, which includes environment configuration.
This command ensures all necessary files are copied from /sapmnt/SID/exe to the running instance
directory.
⚠️2. After Kernel Upgrade, System Not Coming Up
If SAP doesn't start after the kernel upgrade, try these troubleshooting steps:
🔹 Step 1: Clean Shared Memory
Cleans up leftover shared memory and semaphore segments (replace 00 with instance number if different).
This is essential if old memory segments are blocking the startup.
🔹 Step 2: Re-download New Kernel
The download might be corrupted or incomplete. So, redownload and unpack it again.
🔹 Step 3: Replace Old Kernel
Delete or move the old kernel executables before copying the new ones.
🔹 Step 4: Copy from a Working System
You can copy the working kernel from another system:
This copies the working exe directory to your target system for testing or use.
Useful if the production system has a working kernel and you want to replicate it.
📉 3. DB Required Downtime for Kernel Upgrade
This section explains why stopping the database is necessary for kernel upgrade:
🔹 Why DB Must Be Down
SAP kernel contains:
o DB-dependent executables (used to connect to and operate on the database).
o DB-independent executables (used by the SAP runtime).
Some of these files may be actively in use by DB processes (e.g., disp+work, sapstartsrv, etc.).
If the DB or SAP is running, replacing these files will cause:
o File is in use error.
o Unpredictable behavior if you overwrite them while active.
🔹 Recommendation
Shutdown SAP and DB.
This ensures:
o No kernel files are held in memory.
o Safe to replace all kernel binaries.
Avoid manually identifying and killing the process that is using the file.
🔹 Conclusion
Always take planned downtime for both SAP and DB before performing kernel upgrades to avoid runtime errors
and ensure smooth startup.
✅ Summary Checkpoint for SAP Kernel Upgrade:
Step Task
✅ Pre-check Stop SAP & DB, back up old kernel
📁 Copy new kernel Replace in /sapmnt/SID/exe and /usr/sap/SID/DVEBMGSXX/exe
🔄 Use sapcpe Sync kernel files to the instance path
🔁 Shared memory cleanup Use cleanipc to remove stuck memory segments
⚠️If issue after upgrade Re-download kernel / copy from working system / restore old kernel
🛑 Mandatory downtime Shut down SAP & DB to avoid "file in use" errors
⚠️Common Issues While Upgrading the SAP Kernel (Windows)
🧱 1. SAP System Doesn’t Start After Kernel Upgrade
🔍 Symptoms:
SAP MMC shows "yellow" or "red" status
disp+work.exe crashes or does not start
SAP Start Service runs, but no work processes are visible
🛠️Possible Causes & Solutions:
Cause Resolution
Incompatible Kernel version (wrong Unicode/Non- Ensure you downloaded the correct version matching: - Unicode vs. Non-Unicode - 64-
Unicode, wrong patch) bit (NTAMD64) vs 32-bit
Missing or corrupt kernel files Re-extract SAPEXE.SAR and SAPEXEDB.SAR using SAPCAR
Not extracted in the correct folder Must be extracted into: C:\usr\sap\<SID>\SYS\exe\uc\NTAMD64
Antivirus blocks new executables Exclude SAP directories from antivirus scanning
Wrong permissions on executable files Ensure SAPService<SID> user has full permissions on exe and work folders
SAP Host Agent not compatible Update SAP Host Agent if required (especially for new kernel releases)
📦 2. SAPCAR Extraction Fails
🔍 Symptoms:
sapcar -xvf SAPEXE.SAR gives error like:
🛠️Solutions:
Re-download the .SAR file (may be corrupted)
Make sure to use latest SAPCAR.EXE (minimum version 7.21 or higher)
Don’t rename the .SAR files incorrectly (e.g., adding .EXE)
🗃️3. SAP MMC Missing After Upgrade
🔍 Symptoms:
After upgrade, SAP Management Console doesn’t open
MMC Snap-in error or no instance listed
🛠️Solutions:
Run: MMC > File > Add Snap-in > SAP MMC
Reinstall SAP MMC from the SAP GUI installation media if necessary
🔑 4. SAPControl/SAPCPE Errors
🔍 Symptoms:
sapcontrol -function GetProcessList fails
SAPCPE fails with "cannot copy" messages
🛠️Solutions:
Check sapcpe.log in C:\usr\sap\<SID>\<Instance>\work
Ensure DIR_CT_RUN is correctly pointing to global kernel dir
Restart SAP<SID>_StartService
If needed, run sapcpe.exe manually to sync kernel files
📛 5. disp+work.exe -version shows old version after upgrade
🔍 Symptoms:
Even after upgrade, disp+work shows old kernel version
🛠️Reasons & Fixes:
SAP is still using the local kernel instead of global one
Run sapcpe manually to sync:
sapcpe.exe C:\usr\sap\<SID>\SYS\exe\uc\NTAMD64 C:\usr\sap\<SID>\<INSTANCE>\exe
sapcpe.lst C:\usr\sap\<SID>\<INSTANCE>\work\sapcpe.log
Reboot the instance to force sapcpe execution during start
🔒 6. Permission Issues on Files/Folders
🔍 Symptoms:
Kernel files not replaced
sapcpe returns "access denied" or no file copied
🛠️Solutions:
Grant full control to:
o SAPService<SID>
o SAP<SID>_LocalAdmin (if used)
Right-click kernel folder → Properties → Security → Permissions
🛑 7. Services Fail to Start
🔍 Symptoms:
In services.msc, SAP services don’t start or fail immediately
🛠️Causes & Solutions:
Issue Resolution
Kernel replaced while services were still running Always stop SAP Start Service and all SAP services before replacing kernel
Dependent Oracle listener not running Start Oracle<SID>_TNSListener and OracleService<SID> manually first
Kernel files deleted or missing Re-extract .SAR files or restore from backup
Issue Resolution
🔍 Useful Logs to Analyze
Log File Location Purpose
dev_disp, dev_w0, etc. C:\usr\sap\<SID>\<Instance>\work\ Work process logs
sapcpe.log Same work folder Shows file copy status
sapstartsrv.log C:\Program Files\SAP\hostctrl\work\ SAP Start Service logs
✅ Best Practices During Kernel Upgrade (Windows)
Always take a backup of current kernel folder
Stop all SAP and DB-related services
Use latest SAPCAR.EXE for extraction
Extract .SAR files in the correct uc\NTAMD64 folder
After extraction, verify disp+work -version
Start SAP using SAP MMC or sapcontrol