SAP ERP with MaxDB: Difference between revisions
(Minor correction.) |
No edit summary |
||
Line 218: | Line 218: | ||
AVAILABLE|CER CER___6225271628 /tmp/sapdb/CER/pages|PAGES MIGRATION|2009-12-31 10:45:14| | AVAILABLE|CER CER___6225271628 /tmp/sapdb/CER/pages|PAGES MIGRATION|2009-12-31 10:45:14| | ||
AVAILABLE|CER CER___6225285526 /tmp/sapdb/CER/log|LOG RECOVERY |2009-12-31 10:47:33| | AVAILABLE|CER CER___6225285526 /tmp/sapdb/CER/log|LOG RECOVERY |2009-12-31 10:47:33| | ||
* Beispiel für Windows | |||
C:\Users\Administrator>dbmcli.exe -d MAXDB -U dbadmin1 -uSRV | |||
dbmcli.exe on MAXDB>backup_ext_ids_get BACKData | |||
OK | |||
--- | |||
C:\Program Files\sdb\MaxDB\pgm\dbmcli.exe on MAXDB>backup_ext_ids_list | |||
OK | |||
END | |||
AVAILABLE|MAXDB MAXDB_7115418748 \\.\pipe\MAXDB-Data|DATA MIGRATION|2019-10-15 17:43:05| | |||
AVAILABLE|MAXDB MAXDB_711542630 \\.\pipe\MAXDB-Data|PAGES MIGRATION|2019-10-15 17:44:21| | |||
AVAILABLE|MAXDB MAXDB_7123701371 \\.\pipe\MAXDB-Data|DATA MIGRATION|2019-10-16 16:43:31| | |||
AVAILABLE|MAXDB MAXDB_712375260 \\.\pipe\MAXDB-Data|PAGES MIGRATION|2019-10-16 16:52:04| | |||
AVAILABLE|MAXDB MAXDB_7123782847 \\.\pipe\MAXDB-Data|DATA MIGRATION|2019-10-16 16:57:06| | |||
The following example shows a recover check call for the backup type "LOG": | The following example shows a recover check call for the backup type "LOG": | ||
* Call: | |||
dbmcli on CER>service_connect | dbmcli on CER>service_connect | ||
dbmcli on CER>recover_check <BACKUPNAME> LOG ExternalBackupID "<BACKUP_ID>" AUTOIGNORE | dbmcli on CER>recover_check <BACKUPNAME> LOG ExternalBackupID "<BACKUP_ID>" AUTOIGNORE | ||
* Example: here with <BACKUP_ID> "CER CER___6225285526 /tmp/sapdb/CER/log" : | |||
dbmcli on CER>recover_check BACKLog LOG ExternalBackupID "CER CER___6225285526 /tmp/sapdb/CER/log" AUTOIGNORE | dbmcli on CER>recover_check BACKLog LOG ExternalBackupID "CER CER___6225285526 /tmp/sapdb/CER/log" AUTOIGNORE | ||
OK | OK |
Revision as of 16:44, 16 October 2019
Copyright © SEP AG 1999-2024. All rights reserved.
Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.
Installation for SAP R/3 on MaxDB
Prerequisites for the installation of the Sesam SAP/R3 MaxDB Backup Module
Installed Database SAP/R3 with MaxDB Version 6.2 i.e. 7.2.5.
Installation for SAP R/3 on MaxDB in UNIX
1. The regular SEP sesam backup client for UNIX has to be installed on the SAP R/3 server
2. Unpack the tar-archive into a temporary directory. The archive contains the following files:
- backint_sapdb
- backint_sapdb.utl
- bsi.env
3. Copy the file backint_sapdb
into the <SESAM_ROOT>/bin/sesam
directory. Normally root-rights are needed for this. You can also use a different directory. The configuration has to be adjusted accordingly. This file must be executable for the MaxDB SAP R/3 user.
4. Check if the programs sbc and sbc_com_interface are executable in the directory <SESAM DIR>/bin/sesam for the MaxDB user.
5. Copy the file backint_sapdb.utl into <wrk_directory> of the MaxDB. (e.g. /usr/sapdb/indep_data/wrk/CER if the DBsid of the database is CER).
Installation for SAP R/3 on MaxDB in Windows
1. The SEP sesam backup client for Windows has to be installed on the SAP R/3 server. This already includes the necessary files for the MaxDB.
- backint_sapdb.exe
- backint_sapdb.utl
- bsi.env
2. The program backint_sapdb.exe is located in the directory <SESAM ROOT>\bin\sesam. It can also be copied into a different directory e.g. the bin directory of the Max DB. The configuration must then be adjusted accordingly.
3. Copy the files backint_ sapdb.utl and bsi.env from the directory <SESAM ROOT>/skel/ into the <wrk_ directory> of the MaxDB. (e.g. C:\Program Files\sapdb\indep_data\wrk\CER if the DBsid of the database is CER).
Configuration on the SEPsesam Server
The SAP R/3 server has to be added as a client on the SEP sesam server. Additionally, at least one task with the task type SAP R/3 has to be created for the SAP R/3 server.You can also configure more tasks e.g. to distinguish database backups from archivelog backups. The entry for source can be chosen freely. What data is actually backed up only depends on the respective SAP R/3 backup call. This task can 't be used for regular backups.
Configuration on the Sesam SAP/R3 MaxDB client
In order for the Max DB to use the sesam backint_sapdb program the following entries have to be adjusted in the profile file (default: <wrk_directory>/bsi.env).
- BACKINT <full path of the backint_sapdb program>
- INPUT <full path of the input file> This file is used by the MaxDB server to communicate with the backint program.
- OUTPUT <full path of the output file> This file is used by the MaxDB server to communicate with the backint program.
- ERROROUTPUT <full path of the error file> The error message of the backint program is written ins this file.
- PARAMETERFILE <full path of the parameter file that's to be used. In it the sesam specific parameters are adjusted>
- CHECK_AVAILABILITY <number>BACKUPS. Number of old backups queried during restore
See 'Creating the Configuration File for Backint for SAP MaxDB' and 'Example of a Configuration File for Backint for SAP MaxDB'. ]'
Example of a bsi.env file:
Linux:
BACKINT /opt/sesam/bin/sesam/backint_sapdb INPUT /tmp/infile4sapdb OUTPUT /tmp/outfile4sapdb ERROROUTPUT /tmp/backint4sapdb.err PARAMETERFILE /usr/sapdb/indep_data/wrk/CER/backint_CER.utl TIMEOUT_SUCCESS 600 TIMEOUT_FAILURE 300 # ORIGINAL_RUNDIRECTORY /opt/SAPDB/wrk/P1 CHECK_AVAILABILITY 20BACKUPS
Windows:
BACKINT "C:\Program Files\SEPsesam\bin\sesam\backint_sapdb.exe" INPUT C:\temp\CER_sapdb.in OUTPUT C:\temp\CER_sapdb.out ERROROUTPUT C:\temp\CER_backint4sapdb.err PARAMETERFILE C:\ProgramData\sdb\globaldata\wrk\P1\backint_CER.utl TIMEOUT_SUCCESS 600 TIMEOUT_FAILURE 300 # ORIGINAL_RUNDIRECTORY C:\ProgramData\sdb\globaldata\wrk\P1 CHECK_AVAILABILITY 20BACKUPS
INPUT,OUTPUT and PARAMETERFILE |
Note: MaxDB does not support blanks in file names for INPUT, OUTPUT and PARAMETERFILE! |
CHECK_AVAILABILITY |
Setting of CHECK_AVAILABILITY is important for restore. If not set SAP R/3 asks Sesam Server about state of all backups ever made, which can take a very long time. By setting CHECK_AVAILABILITY only last <n> backups are requested. |
Several profile files can be created. They are declared to the MaxDB by setting the enrivonment variable BSI ENV.
Example for setting the environment variable BSI ENV :
dbmcli -d CER -u dbm,dbm dbm_configset -raw BSI_ENV /usr/sapdb/indep_data/wrk/CER/bsi.env
Different values can be set for PARAMETERFILE in the respective profile files. This way, for example, different media pools can be used.
At least the following entries have to be configured in the parameter file (PARAMETERFILE):
- SESAM_SERVER=<Sesam Server>
- Name of the SEPsesam Server on which you want to back up.
- SESAM_JOB=<Sesam SAP Client Task>
- Name of the backup task that's already set up in SEP sesam. You can do that by using the Sesam GUI.
- SESAM_DRIVE=<Sesam Drive Number>
- Number of the Sesam drive that you want to back up on.
- SESAM_POOL=<Sesam Mediapool>
- Name of the Sesam mediapool that you want to back up on
- SSB_LOGFILE=<Log file name>
- Full path of the sesam backint log file>
Further optional configuration parameters:
- SBC=<SESAM_PATH>
- full path of the sesam backup program. It only has to be set if the standard sbc can not be used.
- PORT=<Sesam Server Communication Port>
- only necessaey if the STPD port was changed during the installation of the SEP sesam server.
- SESAM_TAPESERVER=<Remote device server>
- IP-Name of the RDS that you want to back up on. The backup net to be used can be chosen by this entry.
Example of a parameter (.utl) file:
Linux:
SESAM_SERVER=seplinux SESAM_JOB=lxsap01_SAP SESAM_DRIVE=2 SESAM_POOL=fullpool SSB_LOGFILE=/sapdb/data/wrk/CER/backint_CER.log
Windows:
SESAM_SERVER=seplinux SESAM_JOB=win03_SAP SESAM_DRIVE=2 SESAM_POOL=fullpool SSB_LOGFILE=C:\ProgramData\sdb\globaldata\wrk\CER\backint_CER.log
Log Files SAP R/3 on MaxDB
The following log files are written by the individual SAP R/3 Backup modules in the <wrk_ directory> of the MaxDB (e.g. /sapdb/data/wrk/CER or /usr/sapdb/indep_ data/wrk/CER if the DBsid of the database is CER).
BACKINT, SBC and SBC_COM_INTERFACE
The programs backint_sapdb, sbc and sbc_com_interface write in the log file which was set in configuration of the entry SSB LOGFILE in the parameter file. For example /sapdb/data/wrk/CER/backint_CER.log
DBMCLI
The MaxDB program dbmcli writes its log files into the appropriate work directory, e.g. /sapdb/data/wrk/CER/dbm.ebp.
dbmcli calls for SAP/R3 MaxDB
Overall
The backup/restore of the database is done with the MaxDB dbmcli program. You can see the commands in the MaxDB documentation (see http://help.sap.com/search/sap trex.jsp)
Example
- Creating three external media for full-, incr- and log-backup. These are pipes that are used to transfer data between the MaxDB and Sesam.
Syntax
<medium_put> <medium_name> <location type> <backup type> [<size> [<block size> [<overwrite> [<autoloader> [<os command> [<tool type>]]]]]]
Linux:
OS> dbmcli -d TST -u dbm,dbm -c medium_put BACKData /tmp/sapdb/TST/data PIPE DATA 0 8 YES YES pwd BACK OS> dbmcli -d TST -u dbm,dbm -c medium_put BACKPages /tmp/sapdb/TST/pages PIPE PAGES 0 8 YES YES pwd BACK OS> dbmcli -d TST -u dbm,dbm -c medium_put BACKLog /tmp/sapdb/TST/log PIPE LOG 0 8 YES YES pwd BACK OS> dbmcli -d TST -u dbm,dbm -c medium_getall # print list of defined media
Windows:
Microsoft Windows Pipe Names: The name of a backup medium of type PIPE must adhere to the following convention: \\.\pipe\<pipe_name>. (see: medium_put )
C:\> dbmcli -d TST -u dbm,dbm -c medium_put BACKData \\.\pipe\TST-Data PIPE DATA 0 8 YES YES pwd BACK C:\> dbmcli -d TST -u dbm,dbm -c medium_put BACKPages \\.\pipe\TST-Pages PIPE PAGES 0 8 YES YES pwd BACK C:\> dbmcli -d TST -u dbm,dbm -c medium_put BACKLog \\.\pipe\TST-Log PIPE LOG 0 8 YES YES pwd BACK C:\> dbmcli -d TST -u dbm,dbm -c medium_getall
Setting the environment variable BSI ENV
Linux:
OS> dbmcli -d TST -u dbm,dbm dbm_configset -raw BSI_ENV /usr/sapdb/wrk/TST/bsi.env
Windows:
C:\> dbmcli -d TST -u dbm,dbm dbm_configset -raw BSI_ENV C:\ProgramData\sdb\globaldata\wrk\TST\bsi.env
Full backup in cold mode
OS> dbmcli -d TST -u dbm,dbm -c db_cold # set to cold OS> dbmcli -d TST -u dbm,dbm -uUTL -c backup_start BACKData migration
Full backup in warm mode
OS> dbmcli -d TST -u dbm,dbm -c db_warm # set to warm OS> dbmcli -d TST -u dbm,dbm -uUTL -c backup_start BACKData migration
Incremental backup
OS> dbmcli -d TST -u dbm,dbm -uUTL -c backup_start BACKPages migration
Log Backup
OS> dbmcli -d TST -u dbm,dbm -uUTL -c backup_start BACKLog
Full Restore
OS> dbmcli -d TST -u dbm,dbm -c db_cold # set to cold OS> dbmcli -d <DBsid> -u dbm,dbm -uUTL >backup_ext_ids_forget # should return OK >backup_ext_ids_get BACK # should return OK >backup_ext_ids_list # should return OK # and displays a list of EBIDS # Format: # Availability External Backup ID Save Type Date and Time # AVAILABLE <EBID 1> DATA MIGRATION <Date 1> # use full string enclosed in | as EBID >service_connect # open service connection >recover_start BACKData DATA ExternalBackupID "<EBID 1>" # should return OK >db_warm # should return OK >exit
Consistency check of the backup with recover_check
OS> dbmcli -d TST -u <ADMNAME>,<PASSWORT> -uSRV dbmcli on CER>backup_ext_ids_get <BACKUPNAME> # e.g. BACKLog dbmcli on CER>backup_ext_ids_list
This command responds with an list of executed Sesam savesets. The output is divided by the pipe sign (|), the second parameter includes the external backup ID:
AVAILABLE|CER CER___6225258851 /tmp/sapdb/CER/data|DATA MIGRATION|2009-12-31 10:43:06| AVAILABLE|CER CER___6225271628 /tmp/sapdb/CER/pages|PAGES MIGRATION|2009-12-31 10:45:14| AVAILABLE|CER CER___6225285526 /tmp/sapdb/CER/log|LOG RECOVERY |2009-12-31 10:47:33|
- Beispiel für Windows
C:\Users\Administrator>dbmcli.exe -d MAXDB -U dbadmin1 -uSRV dbmcli.exe on MAXDB>backup_ext_ids_get BACKData OK --- C:\Program Files\sdb\MaxDB\pgm\dbmcli.exe on MAXDB>backup_ext_ids_list OK END AVAILABLE|MAXDB MAXDB_7115418748 \\.\pipe\MAXDB-Data|DATA MIGRATION|2019-10-15 17:43:05| AVAILABLE|MAXDB MAXDB_711542630 \\.\pipe\MAXDB-Data|PAGES MIGRATION|2019-10-15 17:44:21| AVAILABLE|MAXDB MAXDB_7123701371 \\.\pipe\MAXDB-Data|DATA MIGRATION|2019-10-16 16:43:31| AVAILABLE|MAXDB MAXDB_712375260 \\.\pipe\MAXDB-Data|PAGES MIGRATION|2019-10-16 16:52:04| AVAILABLE|MAXDB MAXDB_7123782847 \\.\pipe\MAXDB-Data|DATA MIGRATION|2019-10-16 16:57:06|
The following example shows a recover check call for the backup type "LOG":
- Call:
dbmcli on CER>service_connect dbmcli on CER>recover_check <BACKUPNAME> LOG ExternalBackupID "<BACKUP_ID>" AUTOIGNORE
- Example: here with <BACKUP_ID> "CER CER___6225285526 /tmp/sapdb/CER/log" :
dbmcli on CER>recover_check BACKLog LOG ExternalBackupID "CER CER___6225285526 /tmp/sapdb/CER/log" AUTOIGNORE OK Returncode 0 Date 20091231 Time 00110347 Server qslxmax01 Database CER Kernel Version Kernel 7.7.06 Build 009-121-202-944 Pages Transferred 312 Pages Left 0 Volumes 1 Medianame BACKLog Location /tmp/sapdb/CER/log Errortext Label LOG_000000001 Is Consistent First LOG Page 0 Last LOG Page 349 DB Stamp 1 Date 20091230 DB Stamp 1 Time 00111532 DB Stamp 2 Date 20091231 DB Stamp 2 Time 00104514 Page Count 291 Devices Used 1 Database ID qslxmax01:CER_20091231_104306 Max Used Data Page Converter Page Count