Skip to main content
Do checkout my poem section. You are going to love it.

SAP Kernal Upgrade

 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:

  1. 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 (service.sap.com/pam) to ensure the target kernel version is compatible with your current SAP product version, OS, and database.
    • Identify if your system uses a Unicode or Non-Unicode kernel. This determines which SAR files you need to download.
  2. Check Current Kernel Version:

    • In SAP GUI:
      • Go to transaction SM51 -> Release Notes.
      • Go to System -> Status -> Click on "Other Kernel info".
    • At OS Level (as <sid>adm user):
      • Run disp+work or disp+work -version
  3. 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.
  4. 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.
  5. 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:

  1. 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>
      
  2. Transfer Downloaded SAR Files:

    • Copy the downloaded SAPEXE.SAR and SAPEXEDB.SAR files (and SAPCAR.EXE if needed) to the newly created directory.
  3. 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.
  4. 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):

  1. 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
  2. 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/
      
  3. 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 (like br*, sapuxuserchk, icmbnd).
    • Example:
      Bash
      cd /sapmnt/<SID>/exe
      ./saproot.sh <SID>
      
    • If using an Oracle database, you might also need to run oraroot.sh.
  4. 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).

IV. Post-Upgrade Steps and Verification:

  1. Verify New Kernel Version:

    • At OS Level (as <sid>adm):
      • Run disp+work or disp+work -version. The patch level should reflect the newly applied kernel.
    • 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.
  2. 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.
  3. 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.

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

Popular posts from this blog

An experiment with the life

"Best Thing about experiment is that it only improves the outcome." Well, I am Rakshit, hope you already know. I am not special and surely not especially gifted. Neither things go according to my wish. Neither I am the best writer.  But I am myself who is totally unique from anyone else. And I am Rakshit Ranjan Singh. I have my own fun, fights and fall in the most fundamentalistic way. Mechanical is my degree. IT is my Job. Beauty in nature is what I search. Words of my heart are what I write. Four different things I carry on my shoulder and a smile on my face, hope you might have seen that. What do I care for? Family, friends and nature. Do I have regrets? More than I can imagine. Let us move further to see what really is my life.

Learn Java

Hello Friends, You might already know what Java is. Without taking much of your time, I would like to ask you to please click below if you are ready to learn it from end to end. The Material over here is available on the internet and is free to access.  I would request you to bookmark this page and follow it. Please comment if you are happy with the learning. click here

Driving

My Driving Journey: From Zero to (Almost) Hero! Hello everyone! I'm excited to share my ongoing adventure of learning to drive. It's been a mix of nervous excitement, hilarious near-misses, and the slow but steady feeling of progress. Buckle up, because here's a peek into my journey behind the wheel! The First Lesson: Clutch Confusion! My first time in the driver's seat was... memorable. Let's just say the clutch and I weren't immediate friends. Lots of jerky starts and a few stalls later, I began to understand the delicate dance between the pedals. My instructor was incredibly patient (thank goodness!). Mastering the Steering Wheel (Sort Of) Steering seemed straightforward enough, but navigating turns smoothly was a different story. I definitely had a few moments of feeling like I was wrestling with the wheel. Slowly but...