SnapCenter Integration for SAP MaxDB Database
This document describes the SnapCenter integration specifics for SAP MaxDB Database used in an SAP environment.
Introduction
The document is not intended to be a step-by-step description of how to setup the complete environment but will cover concepts and relevant details related to:
-
Example configuration overview
-
Sample Layout
-
Protect SAP MaxDB Instance
-
Restore and Recover SAP MaxDB Instance
Example configuration overview
Example Implementation for SnapCenter MaxDB Plugin for an SAP System running in our Demo Center.
|
This implementation describes the minimal required volume configuration. Data Dump Backups and Log Dump Backups, Backup Template, etc. are configured according to SAP Note “1928060 - Data backup and recovery with file system backup” and referenced Notes from there. |
Alternatively, the volume structure described in MS Techcommunity Blog could be used.
Demo Environment
Software versions
Software | Version |
---|---|
Linux OS |
SLES for SAP 15 SP5 |
SAP |
SAP NetWeaver 7.5 |
SAP MaxDB |
DBMServer 7.9.10 Build 004-123-265-969 |
SnapCenter |
6.1 |
MaxDB Volume Design
Following least volume Layout must be used to enable backup / recovery and clone use-cases for the SAP MaxDB database. The example configuration use <SID>: M02.
Volume Name | Directory (qtree) on Volume | Mount Point on Server | Comment |
---|---|---|---|
<SID>_sapmaxdb |
sapdb |
/sapdb |
Parent directory for MaxDB related files |
/sapdb/<SID>/saplog |
Redo Logs (might be placed on a different volume) |
||
/sapdb/<SID>/backup |
Dump Backups (Data + Log) (might be placed on a different volume) |
||
<sid>adm |
/home/<sid>adm |
Home directory of user <sid>adm |
|
sdb |
/home/sdb |
Home directory of User sdb |
|
sqd<sid> |
/home/sqd<sid> |
Home directory of User sqd<sid> |
|
usrsaptrans |
/usr/sap/trans |
Transport directory |
|
usrsap<SID> |
/usr/sap/<SID> |
Usr sap |
|
sapmnt<SID> |
/sapmnt/<SID> |
SAP GlobalHost Dir |
|
<SID>_data |
sapdata |
/sapdb/<SID>/sapdata |
DB Data Files (SID) |
Steps to Protect Database M02
-
Check File distribution, according to the sample Layout
-
Check Prerequisites for the Host (sap-lnx25)
-
Check Prerequisites for the Database (M02)
-
Deploy / Install SnapCenter Agent on Host (sap-lnx25)
-
Create SnapCenter Instance Resource Configuration
Prerequisites on Host
More current information might be available here.
Before you add a host and install the plug-ins package for Linux, you must complete all the requirements.
-
If you are using iSCSI, the iSCSI service must be running.
-
You can either use the password-based authentication for the root or non-root user or SSH key based authentication.
-
SnapCenter Plug-in for Unix File Systems can be installed by a non-root user. However, you should configure the sudo privileges for the non-root user to install and start the plug-in process. After installing the plug-in, the processes will be running as an effective non-root user.
-
Create credentials with authentication mode as Linux for the install user.
-
You must have installed Java 11 on your Linux host.
-
Ensure that you have installed only the certified edition of JAVA 11 on the Linux host
-
For information to download JAVA, see: Java Downloads for All Operating Systems
-
You should have bash as the default shell for plug-in installation.
Prerequisites for the Database – Create Backup Templates, Enable Logbackup
-
Create Directories for data and log backups (/sapdb/M02/backup/data, /sapdb/M02/backup/log – owner sdb:sdba – Permissions 755)
-
Connect to database M02 (as OS-user sqdm02)
-
dbmcli -d M02 -u CONTROL,<password>
-
-
Create Data File Backup Template (M02_DATA) according to SAP Note 1928060
-
backup_template_create M02_DATA to FILE /sapdb/M02/backup/data/M02_DATA content DATA
-
-
Create Data Backup Template (M02_LOG) according to SAP Note 1928060
-
backup_template_create M02_LOG to FILE /sapdb/M02/backup/log/M02_LOG content LOG
-
-
Create Data Snapshot Backup Template (M02_SNAP) according to SAP Note 1928060
-
backup_template_create M02_SNAP to EXTERNAL SNAPSHOT
-
-
Create Fake-Backup to enable LOG Backup
-
util_connect
-
backup_start M02_SNAP
-
backup_finish M02_SNAP ExternalBackupID first_full_fake_backup
-
-
Switch Database Logging Mode
-
autolog_off
-
autolog_on M02_LOG INTERVAL 300
-
autolog_show
-
Deploy SnapCenter Agent to Host sap-lnx25
Further Information could be found in the SnapCenter documentation.
Select SAP MaxDB and Unix File Systems Plugins.
Create SnapCenter Resource Configuration for Database M02
Resources → SAP MaxDB → Add Resources
|
If Password contains Special Characters, they must be masked with a backslash (e.g. Test!123! → Test\!123\!). |
Following Resource Settings Custom key-value pairs must be made (at least).
The following table lists the MaxDB plug-in parameters, provides their settings, and describes them:
Parameter | Setting | Description |
---|---|---|
HANDLE_LOGWRITER |
(Y / N) |
Executes suspend logwriter (N) or resume logwriter (Y) operations. |
DBMCLICMD |
path_to_dbmcli_cmd |
Specifies the path to the MaxDB dbmcli command.If not set, dbmcli on the search path is used. |
SQLCLICMD |
path_to_sqlcli_cmd |
Specifies the path for the MaxDB sqlcli command.If not set, sqlcli is used on the search path. |
MAXDB_UPDATE_HIST_LOG |
(Y / N) |
Instructs the MaxDB backup program whether or not to update the MaxDB history log. |
MAXDB_BACKUP_TEMPLATES |
template_name (e.g. |
Specifies a backup template for each database.The template must already exist and be an external type of backup template. |
MAXDB_BG_SERVER_PREFIX |
bg_server_prefix (e.g. |
Specifies the prefix for the background server name. If the MAXDB_BACKUP_TEMPLATES parameter is set, you must also set the MAXDB_BG_SERVER_PREFIX parameter. If you do not set the prefix, the default value na_bg_DATABASE is used. |
Now the configuration could be finished and Backup scheduled according to the overall protection concept.
Sequence to Recover System M02
-
stop SAP System M02 (including database), stop sapinit
-
umount Filesystem /sapdb/M02/sapdata
-
restore Volumes M02_data (using SnapCenter)
-
mount Filesystem /sapdb/M02/sapdata
-
start Database M02 and connect (admin mode)
-
Gather Backup Information
-
recover database data backup
-
recover database log backups
-
stop database
-
start sapinit, SAP System M02
Recover Instance M02
-
Stop SAP System + DB M02 on host sap-lnx25
-
User m02adm: stopsap
-
Optional – if database has not been stopped successfully – User: sqdm02
-
dbmcli -d M02 -u CONTROL,<password>
-
db_offline
-
-
User root: /etc/init.d/sapinit stop
-
User root: umount /sapdb/M02/sapdata
-
-
Restore Backup
-
SnapCenter GUI: Select required Bacukp for Restore
-
|
Selecting Complete Resource will trigger a Volume Based Snap Restore (VBSR). Within Azure it is called volume revert. For ANF Deployment only Complete Resource is available. |
|
For other deployment Types (e.g. On-Prem ANF) a Single File Snap Restore (SFSR) Operation could be orchestrated. Select File Level and the according Volume and Checkmark “All” – see following screenshot. |
Summary would be displayed and with Finish the actual restore is started.
-
Mount Filesystems (sap-lnx25)
-
User root: mount /sapdb/M02/sapdata
-
-
Start Database M02 in admin mode an connect
-
User: sqdm02: dbmcli -d M02 -u CONTROL,<password>
-
db_admin
-
db_connect
-
-
-
Gather Backup Information
-
backup_history_open
-
backup_history_list -c label,action,pages,stop,media -r last
-
-
Recover Database
-
Recover Data Backup
-
recover_start M02_SNAP data ExternalBackupID DAT_000000008
-
-
Recover Log Backup as necessary
-
e.g. recover_start M02_LOG LOG 147
-
-
Optional Information – autorecover to a specific time stamp (without need to specify dedicated data / log backp
-
e.g. autorecover until 20250520 200000
-
-
-
End Recovery and stop Database
-
db_offline
Further information about Recovery is available in the MaxDB Documentation
-
-
start SAP System
-
User root: /etc/init.d/sapinit start
-
User m02adm: startsap
-
Additional information and version history
Recorded Demos
Following recoded Demos are available to support the documentation.
External Documentation
To learn more about the information that is described in this document, review the following documents and/or websites:
-
SAP Notes (login required)
-
NetApp SAP Solutions – Informations about Use-Cases, Best-Practices and Benefits
Version history
Version | Date | Document version history |
---|---|---|
Version 1.0 |
May 2025 |
Initial version – backup / recovery MaxDB database |