SAP® MaxDB - Directory Structure
Moderator: Birgit Malik
WIKI Space Editor: Thiago Lüttig
- dbm_getpath (get path information)
- param_getvolsall (get data, log volume path information)
- backup_template_show / backup_template_show_next (get path information about backup locations)
- Expert Session 7: SAP MaxDB Software Update Basics (Recording)
- Expert Session 7: SAP MaxDB Software Update Basics (Slides)
General Information
The check if a user has permissions to access a file or directory takes place in this order:
- If the user is the owner of the file/directory, then the permissions for owner have to be set. The permissions for group and others are not evaluated!
- If the user is not the owner of the file/directory but belongs to one of its groups, then the permissions for group have to be set. The permissions for others are not evaluated!
- If the user neither is the owner of the file/directory nor belongs to one of its groups, then the permissions for others have to be set.
Meaning of the mode flags regular files, named pipes, devices, IPC resources: r-- reading of content is allowed -w- writing of content is allowed --x executing of content is allowed
Directories: r-- reading of entries in the directory is allowed -w- creating and deleting of files in the directory is allowed --x finding/listing of files in the directory is allowed (search permission)
In directories without search permission no files or subdirectories can be seen or used!
Permissions of symbolic links (soft links): Mode is lrwxrwxrwx and can not be changed. UID and GID can be changed as user root.
SAP MaxDB file and directory permissions
SAP MaxDB and liveCache use different files/directories to store the needed data. Do not change any permission after the database software and the database were installed, otherwise you could get permission problems (e.g. error permission denied).
Please note: If the permissions are set incorrectly you can get database restart problems. See also SAP note 1789865.
Keep in mind, that if e.g. a permission denied error for a data volume is logged in file KnlMsg, the reason can be missing privileges in one of the parent directories of a soft link pointing to that directory. Therefore make sure to check all parent directories of the specific file!
Use sdbverify to check and repair permissions.
sdbverify
sdbverify can be used to perform a consistency check over SAP MaxDB/liveCache installation. Log on on operating system level as user root and execute the command sdbverify. If there are warning reported it confirms that file mode and/or ownership changes have been made to some of SAP MaxDB/liveCache files.
If you run into permission problems, you can set the permissions again correctly as of version 7.8. with just running the command sdbverify -repair_permissions to have access mask and owner/group reset to its installation default.
To fix the problems, still logged as user root, execute the command sdbverify -repair_permissions.
For more details about sdbverify see SAP note 546737 Database Software Installation check, SAP note 1789865 Database does not start due to wrong file permissions, 2992686 SAP MaxDB/liveCache software is not working due to wrong permissions in the database file system on Unix/Linux
<independent_data_path>
The independent data directory contains the configuration data and rundirectories of SAP MaxDB databases and SAP MaxDB applications. The default location of the independent data directory for SAP installations is: /sapdb/data/ on Unix/Linux C:\sapdb\data on Microsoft Windows
The location of this directory is specified during the first installation of SAP MaxDB software. If you don't know the location of this directory you can determine it with:
dbmcli dbm_getpath indepdatapath
The <independent_data_path> directory contains several directories concerning the process management of SAP MaxDB - e.g. pid and ipc. In subdirectory wrk you can find log files of SAP MaxDB software installations and upgrades as well as the X server log file and the run directories of the SAP MaxDB databases.
Directory <independent_data_path>/config contains e.g. registry information (Registry<n>.dcom), parameter files of the SAP MaxDB databases (named like the database) and the parameter history (<database_name>.pah).
Directory <independent_data_path>/config/install contains information about the files of the SAP MaxDB software installation (install registry).
<independent_programs_path>
The independent programs directory contains the programs and libraries shared by the SAP MaxDB databases and SAP MaxDB applications. These programs are downwards compatible. The default location of the independent programs directory for SAP installations is: /sapdb/programs on Unix/Linux C:\sapdb\programs on Microsoft Windows
The location of this directory is specified during the first installation of SAP MaxDB software. If you don't know the location of this directory you can determine it with:
dbmcli dbm_getpath indepprogpath
<dependent_path>
This directory contains the server software that depends on the database version (e.g. kernel). Several dependent directories can exist alongside each other. Every database should be assigned to its own dependent directory - that is two databases should not share one dependent directory. The location of this directory is specified during the installation of SAP MaxDB software, the default for SAP installations is: /sapdb/<database_name>/db on Unix/Linux C:\sapdb\<database_name>\db on Microsoft Windows
If you don't know the location of this directory you can determine it with: dbmcli inst_enum
<run_directory>
By default most log and status files are stored in the run directory. Every database has its own run directory. The run directory location is specified by the database parameter RUNDIRECTORY. The default location is: <independent_data_path>/wrk/<database_name>
If you don't know the location of the run directory you can determine it with: dbmcli -d <database_name> -u <dbm_operator>,<password> param_directget RUNDIRECTORY
xinstinfo
You can use the program XINSTINFO to obtain information about the directory structure of a specific SAP MaxDB database. Call XINSTINFO as follows : xinstinfo <database_name>
You receive the following information:
- IndepData
- IndepPrograms
- InstallationPath
- Kernelversion
- Rundirectory
back to top