on 03-09-2012 11:38 AM
Dear experts,
one of our customers has a live installation of SAP ECC 6.04 based on Linux and MaxDB version 7.7.06.10. I recently took over the maintenance of the system, and following the recommendations of the Early Watch Alerts I've scheduled various maintenance jobs via transaction DBACOCKPIT, among them DB13CMirror.
This job now fails with a SAPSQL_ARRAY_INSERT_DUPREC dump. While debugging the code I've found what I think is a bug in the MaxDB database engine.
In method LOGS_OF_PERIOD_DB13C of class CL_DBA_DB13C_BACKEND there's a SELECT on table DB6PMPROT that should extract the MAX value of field STARTTIME (which is declared as a CHAR 14). I've traced the command via tr. ST05 and this is the full SQL statement:
SELECT
MAX ("STARTTIME")
FROM
"DB6PMPROT"
WHERE
"SYSTEM_ID" = 'PRD' AND ( "PROGID" = 'ALLNC' OR "PROGID" = 'ALL' OR "PROGID" =
'PAGNC' OR "PROGID" = 'PAGE' OR "PROGID" = 'AUON' OR "PROGID" = 'AUOFF' OR
"PROGID" = 'LOG' OR "PROGID" = 'UPD2' OR "PROGID" = 'UPD3' OR "PROGID" =
'UPD1' OR "PROGID" = 'VERI' OR "PROGID" = 'VERI1' OR "PROGID" = 'VERI2' OR
"PROGID" = 'VERI3' OR "PROGID" = 'VERIX' OR "PROGID" = 'GENER' OR "PROGID" =
'COLTS' OR "PROGID" = 'ARCHF' OR "PROGID" = 'CDBCK' OR "PROGID" = 'CPBCK' OR
"PROGID" = 'CLBCK' )
Now, if I run this SELECT statement directly in DB Studio:
SELECT
"STARTTIME"
FROM
"DB6PMPROT"
WHERE
"SYSTEM_ID" = 'PRD' AND ( "PROGID" = 'ALLNC' OR "PROGID" = 'ALL' OR "PROGID" =
'PAGNC' OR "PROGID" = 'PAGE' OR "PROGID" = 'AUON' OR "PROGID" = 'AUOFF' OR
"PROGID" = 'LOG' OR "PROGID" = 'UPD2' OR "PROGID" = 'UPD3' OR "PROGID" =
'UPD1' OR "PROGID" = 'VERI' OR "PROGID" = 'VERI1' OR "PROGID" = 'VERI2' OR
"PROGID" = 'VERI3' OR "PROGID" = 'VERIX' OR "PROGID" = 'GENER' OR "PROGID" =
'COLTS' OR "PROGID" = 'ARCHF' OR "PROGID" = 'CDBCK' OR "PROGID" = 'CPBCK' OR
"PROGID" = 'CLBCK' )
I get the following results (I'm just copying 10 lines here, to give you the idea of what's happening):
20120305220000
20120306220000
20120307220000
20120226080000
20120304080000
20120226070000
20120304070000
20120226090000
20120304090000
20120226100000
20120304100000
Now given the data I would expect the SELECT MAX statement over there to return 20120307220000,
instead I get 20120304100000! This is wrong because 20120307220000 is greater than 20120304100000.
This is why the report works on lines it has already processed and gives the SAPSQL_ARRAY_INSERT_DUPREC dump.
Just to be sure I used ORDER BY "STARTTIME" and if I do this, 20120307220000 is placed after 20120304100000 as it should be.
What's happening here? Is there a way to fix this?
Thank you very much for your support.
I have updated MaxDB to the latest available patch level for version 7.7 (7.7.07.41) and the problem seems to be solved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.