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

Directory structure in SAP BASIS and HANA

 Understanding the directory structure is fundamental for any SAP Basis or SAP HANA administrator. It allows for efficient navigation, troubleshooting, log analysis, and proper system management. Both environments have distinct but logically organized file systems.


1. SAP ABAP (Basis) Directory Structure

The SAP ABAP application server, part of SAP NetWeaver, organizes its files into a hierarchical directory structure. This structure typically distinguishes between global (shared across all instances) and local (instance-specific) directories.

Key Directories (typically on Unix/Linux, Windows paths are similar):

  • /sapmnt

    • This is the global mount point for the entire SAP system. It's usually mounted via NFS (Network File System) and is shared across all application servers belonging to the same SAP System ID (SID).
    • /sapmnt/<SAPSID>: The main system directory.
      • /sapmnt/<SAPSID>/exe: Contains the SAP kernel executables (binaries) for all platforms. This directory is replicated to the local exe directories of each instance.
      • /sapmnt/<SAPSID>/global: Contains globally shared data, such as:
        • System logs (e.g., SLOG<client_no>, SLOGJ, SLOGP).
        • Spool data (sapgpar).
        • Some application-specific global files.
        • Shared directories for specific SAP modules (e.g., APO, BW).
      • /sapmnt/<SAPSID>/profile: This is the profile directory containing all SAP instance profiles:
        • DEFAULT.PFL: The Default Profile, which contains parameters common to all instances of the SAP system.
        • <SAPSID>_D<Instance_Number>_<Hostname>: The Instance Profile for Primary Application Servers (PAS) and Additional Application Servers (AAS). It contains parameters specific to that instance (e.g., work process numbers, memory settings, buffer sizes).
        • <SAPSID>_ASCS<Instance_Number>_<Hostname>: The Instance Profile for the ABAP Central Services (ASCS) instance (containing Message Server and Enqueue Server).
        • <SAPSID>_ERS<Instance_Number>_<Hostname>: The Instance Profile for the Enqueue Replication Server (ERS) instance (used in High Availability setups).
    • /sapmnt/<SAPSID>/trans: This is the global transport directory (TMS, Transport Management System).
      • data: Contains data files of transport requests (R<request_number>.<SAPSID>).
      • cofiles: Contains cofiles (control files) of transport requests (K<request_number>.<SAPSID>).
      • log: Contains transport logs.
      • buffer: Contains the transport buffer for each system in the transport route.
      • bin: Contains TMS configuration files.
  • /usr/sap

    • This directory typically holds instance-specific data and symbolic links to global directories.
    • /usr/sap/<SAPSID>: System-specific data.
      • /usr/sap/<SAPSID>/SYS: Contains symbolic links to the global directories in /sapmnt/<SAPSID>, ensuring local access to shared resources.
      • /usr/sap/<SAPSID>/<Instance_Name>: (e.g., DVEBMGS00, D01, ASCS00) This is the instance-specific directory.
        • exe: Local copy of the kernel executables. sapcpe program ensures this is synchronized with /sapmnt/<SAPSID>/exe during instance startup.
        • data: Local data files for the instance, often temporary files.
        • log: Local log files for the instance.
        • work: The working directory for the instance's processes. This is where individual work process trace files (dev_w*), dispatcher trace (dev_disp), ICM trace (dev_icm), and other temporary logs reside. This directory is crucial for real-time troubleshooting.
        • icm: ICM related files.

Important Configuration Files in ABAP:

The primary configuration files for an ABAP system are the profiles, located in /sapmnt/<SAPSID>/profile. These are text files containing various parameters that control the behavior of the SAP system and its instances.

  • DEFAULT.PFL (Default Profile):
    • Contains parameters that apply to all instances of the SAP system.
    • Examples: rdisp/message_server (Message Server hostname/port), login/system_client (default client for logon), DIR_TRANS (path to transport directory).
  • Instance Profiles (<SAPSID>_<Instance_Name>_<Hostname>.PFL):
    • Contains parameters specific to a particular SAP instance.
    • Examples:
      • rdisp/wp_no_dia (Number of dialog work processes)
      • rdisp/wp_no_btc (Number of background work processes)
      • abap/buffersize (ABAP program buffer size)
      • em/initial_size_MB (Extended memory size)
      • icm/server_port_0 (ICM HTTP/HTTPS port)
      • dbs/db2/schema (Database schema for DB2)
      • DB_CONNECT (Database connection string)
  • START_<Instance_Name>_<Hostname>.PFL (Start Profile):
    • A smaller profile that controls the startup of an SAP instance. It specifies which executables to start and in what order.

2. SAP HANA Directory Structure

SAP HANA, as an in-memory database, has a distinct file system structure designed for its persistence layer (data and log volumes) and software components.

Key Directories (typically on Unix/Linux):

  • /hana

    • /hana/shared/<SAPSID>: This is a shared file system across all hosts in a distributed (scale-out) HANA system. It contains global components and executables for the HANA database.
      • /hana/shared/<SAPSID>/global: Global files for the HANA system.
      • /hana/shared/<SAPSID>/HDB<Instance_Number>: The installation directory for the HANA instance.
        • exe: HANA executables and binaries.
        • install: Installation-related files.
        • backup: Default location for data backups.
        • <hostname>: Host-specific sub-directory.
          • trace: Crucial directory for all HANA trace and log files. This includes:
            • indexserver_<hostname>.log
            • nameserver_<hostname>.log
            • daemon_<hostname>.log
            • Other service-specific traces (e.g., statisticsserver, preprocessor, xsengine).
            • OOM (Out Of Memory) dumps.
            • Crash dumps.
          • log: Symbolic link to the /hana/log/<SAPSID>/<hostname>/trace directory, which is specific to the log volume.
          • data: Symbolic link to the /hana/data/<SAPSID>/<hostname>/mnt00001 directory, which is specific to the data volume.
  • /hana/data

    • /hana/data/<SAPSID>/<hostname>/mnt00001: This is the data volume directory for a specific host. It stores the actual in-memory data persistently on disk at regular savepoints. Each HANA service (indexserver, nameserver, etc.) has its own data sub-directory here.
  • /hana/log

    • /hana/log/<SAPSID>/<hostname>/mnt00001: This is the log volume directory for a specific host. It stores the redo logs (transaction logs) that capture all changes to the database. These logs are crucial for recovery and ensuring transaction atomicity.
  • /usr/sap

    • /usr/sap/<SAPSID>: Similar to ABAP, this contains instance-specific data for HANA.
    • /usr/sap/<SAPSID>/HDB<Instance_Number>: (Instance-specific directory)
      • SYS: Contains symbolic links to the global and profile directories within /hana/shared.

Important Configuration Files in HANA (INI Files):

HANA uses INI files for configuration, located in the trace directory or accessible via SAP HANA Studio/Cockpit. These files control various aspects of the database and its services.

  • global.ini:
    • Contains parameters that apply globally to the entire SAP HANA system (all hosts and services).
    • Examples: [communication] (network settings), [persistency] (savepoint parameters), [memory_manager] (global memory limits).
  • Service-Specific INI Files (e.g., indexserver.ini, nameserver.ini, daemon.ini):
    • Contains parameters specific to individual HANA services.
    • indexserver.ini: Crucial for the indexserver service, which stores and processes data. Examples: [row_store] (row store size), [column_store] (column store specific settings), [query_engine] (query processing).
    • nameserver.ini: For the nameserver service, which manages the system topology. Examples: [landscape] (topology details), [ha_dr] (high availability/disaster recovery settings).
    • daemon.ini: For the daemon service, which monitors and controls other HANA services. Examples: [daemon] (service startup order, restart behavior).
  • listen.ini: Defines network listener ports for HANA services.
  • topology.ini: Defines the system topology for scale-out landscapes.

Similarities and Differences in Structure

Similarities:

  • Hierarchical and Logical: Both structures are well-organized into logical hierarchies, making it easier to locate specific files.
  • Global vs. Local: Both distinguish between globally shared directories (e.g., /sapmnt in ABAP, /hana/shared in HANA) and instance-specific local directories (/usr/sap/<SAPSID>/<Instance_Name> for ABAP, /usr/sap/<SAPSID>/HDB<Instance_Number> for HANA).
  • Centralized Profile/Config: Both have a central location for system-wide and instance-specific configurations (ABAP profiles, HANA INI files).
  • Dedicated Log/Trace Directories: Both have specific directories for logs and trace files that are crucial for monitoring and troubleshooting.
  • Platform Independent Logic: While paths may vary slightly between OS (e.g., /usr/sap on Unix vs. C:\usr\sap on Windows), the logical organization remains consistent.

Differences:

  • Persistence Focus: ABAP's file system is primarily for application binaries, logs, and profiles, with the actual data residing in a separate, external database. HANA's structure includes its own persistence layer (/hana/data, /hana/log) as it's the database itself.
  • Shared Mount Point Purpose: /sapmnt is primarily for shared executables, profiles, and transport data. /hana/shared is for HANA binaries, global files, and shared components of the database system.
  • Central Configuration Files: ABAP uses .PFL (profile) files. HANA uses .ini files.
  • Instance Naming: ABAP instances use D, ASCS, ERS prefixes. HANA instances use HDB (and for tenant DBs, DB_<SID>).
  • Log Granularity: HANA's trace files are highly granular per service, reflecting its microservice-like architecture, while ABAP has work process-specific traces.

Monitoring and Management Aspects

The well-defined directory structures are essential for Basis/HANA administrators to:

  1. Troubleshooting: Knowing where to find specific trace files (e.g., dev_w* for ABAP work process issues, indexserver_*.log for HANA crashes) is the first step in diagnosing problems.
  2. Performance Tuning: Adjusting parameters in profile files (ABAP) or INI files (HANA) allows administrators to optimize memory, work process allocation, and other resource usage.
  3. Space Management: Regularly checking disk space utilization in key directories (/sapmnt, /usr/sap, /hana/data, /hana/log) is critical to prevent system outages. Tools like df -h (Unix/Linux) or OS-level disk management tools are vital.
  4. Log Rotation/Archiving: Implementing policies to rotate, compress, and archive old logs and trace files prevents disk overflow and ensures efficient storage.
  5. Security: Restricting access to sensitive directories and configuration files is paramount.
  6. Backup and Recovery: Knowing the location of data and log volumes (HANA) or critical binaries and profiles (ABAP) is crucial for robust backup and recovery strategies.
  7. Upgrades and Patching: Installation and update tools rely heavily on these defined directory structures to apply changes correctly.

In essence, the directory structure acts as the foundational map for navigating and controlling the entire SAP landscape.

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...