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 localexe
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).
- System logs (e.g.,
/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 theglobal
andprofile
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 theindexserver
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 thenameserver
service, which manages the system topology. Examples:[landscape]
(topology details),[ha_dr]
(high availability/disaster recovery settings).daemon.ini
: For thedaemon
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 useHDB
(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:
- 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. - Performance Tuning: Adjusting parameters in profile files (ABAP) or INI files (HANA) allows administrators to optimize memory, work process allocation, and other resource usage.
- Space Management: Regularly checking disk space utilization in key directories (
/sapmnt
,/usr/sap
,/hana/data
,/hana/log
) is critical to prevent system outages. Tools likedf -h
(Unix/Linux) or OS-level disk management tools are vital. - Log Rotation/Archiving: Implementing policies to rotate, compress, and archive old logs and trace files prevents disk overflow and ensures efficient storage.
- Security: Restricting access to sensitive directories and configuration files is paramount.
- 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.
- 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
Post a Comment