cancel
Showing results for 
Search instead for 
Did you mean: 

SAP/MaxDB backup of transaction logs - status code 6 resolution

RadovanTuran
Level 4

If you are backing up transaction logs of SAP/MaxDB you probably have often failed backups with status code 6. But nothing wrong happened. Just no transactions was available for backup. It's a behavior of dbmcli - anything except successful backup returns exit code 1. But parent wrapper script provided by Symantec is not able to distinguish real errors from situation where there are just no transactions to backup. (Read TECH129715). By Symantec we have to wait until SAP will provide dbmcli with more granular exit codes. Seems that we cannot do anything.

Or can?

What is the standard output of successful backup? Here is one example of stdout log file from bphdb log directory:

SAP_SCHEDULED = 1
SAP_USER_INITIATED = 0
SAP_SERVER = master
SAP_POLICY = CUSTOMER1-SAP
SAP_FULL = 0
SAP_CINC = 0
OK
Returncode              0
Date                    20131011
Time                    00232008
Server                  SAPDB1
Database                DB1
Kernel Version          Kernel    7.9.08   Build 008-123-247-140
Pages Transferred       24
Pages Left              0
Volumes                 1
Medianame               BACKLog
Location                \\.\pipe\BACKLog
Errortext              
Label                   LOG_000000662
Is Consistent          
First LOG Page          1990049
Last LOG Page           1990050
DB Stamp 1 Date         20131011
DB Stamp 1 Time         00230056
DB Stamp 2 Date         20131011
DB Stamp 2 Time         00230056
Page Count              1
Devices Used            1
Database ID             SAPDB1:DB1_20130615_201611
Max Used Data Page     
Converter Page Count   
DBMCLI successful

And now something completely different:

SAP_SCHEDULED = 1
SAP_USER_INITIATED = 0
SAP_SERVER = master
SAP_POLICY = CUSTOMER1-SAP
SAP_FULL = 0
SAP_CINC = 0
ERR
-24920,ERR_BACKUPOP: backup operation was unsuccessful
The database was unable to fulfill a request (-123, No more log to save).
Execution of DBMCLI command failed - exiting

This is the example of situation when MaxDB has no transactions available since last backup. I have decided to use string "-123, No more log to save" as detector of this situation. Check whether your version of SAP/MaxDB is working the similar way.

And what is the final solution? Just to catch output of dbmcli and seek for the right string.

The whole script with colorized changes is available on my page HERE.

Please, try it. May it will help you. In case of any troubles, send me a notice (like other string for different versions of MaxDB).

0 REPLIES 0