SAP Knowledge Base Article - Preview

2734487 - The row keys are not sorted correctly - SAP SRS Data Assurance

Symptom

  • Data assurance reports "The row keys are not sorted correctly".
  • We can see the following info:

Target 1: COMPARE_ALL (ABORTED)
[Source error: The row keys are not sorted correctly.]
[Source error: java.net.SocketException; Broken pipe (Write failed)]
[Target error: The row keys are not sorted correctly.]
[Target error: java.net.SocketException; Broken pipe (Write failed)]

  • In DA server log:

W yyyy-mm-aa 15:41:57.057 COMPARE CompareRetryTask.sourceKeySortError@14602 xxxxxsit1_ipcd/cmp1: The row keys are not sorted correctly.: curr=['Q4166 ']; prev=['Q4166J']
W yyyy-mm-aa 15:41:57.057 COMPARE CompareRetryTask.targetKeySortError@14602 xxxxxsit1_ipcd/cmp1[0]: The row keys are not sorted correctly.: curr=['Q4166 ']; prev=['Q4166J']
W yyyy-mm-aa 16:56:17.017 COMPARE CompareRetryTask.sourceKeySortError@14665 xxxxxsit1_ipcd/cmp1: The row keys are not sorted correctly.: curr=['Q4166 ']; prev=['Q4166J']
W yyyy-mm-aa 16:56:17.017 COMPARE CompareRetryTask.targetKeySortError@14665 xxxxxsit1_ipcd/cmp1[0]: The row keys are not sorted correctly.: curr=['Q4166 ']; prev=['Q4166J']
W yyyy-mm-aa 17:07:46.046 COMPARE CompareRetryTask.sourceKeySortError@14678 xxxxxsit1_ipcd2/cmp1: The row keys are not sorted correctly.: curr=['Q4166 ']; prev=['Q4166J']
W yyyy-mm-aa 17:07:46.046 COMPARE CompareRetryTask.targetKeySortError@14678 xxxxxsit1_ipcd2/cmp1[0]: The row keys are not sorted correctly.: curr=['Q4166 ']; prev=['Q4166J']

  • There were several rows with a new line character in the key column.
  • EXTERNAL_SORT is not set to TRUE


Read more...

Environment

  • SAP Replication Server Data Assurance Option 16.0 SP03 PL04
  • SAP Adaptive Server Enterprise (ASE) 15.7 SP132

Product

SAP Adaptive Server Enterprise 15.7 ; SAP Replication Server 16.0

Keywords

trailing spaces, Comparison

ASE char(n) padding

ASE will use the ASCII character 0x20 (32 in decimal) to pad CHAR values that are less than n characters long.

E.g. if you insert the value ‘fridge’ into a CHAR(7) column, it will contain ‘fridge ’ where the trailing space is 0x20.

 

DA trailing space handling

-              Each COMPARISON has an IGNORE_TRAILING_SPACES option, which is set to TRUE by default.

-              Each COLUMN in a COMPARISON also has an IGNORE_TRAILING_SPACES option, which allows the option to be overridden at the column level (it is unset by default, i.e. do no override).

-              DA considers the ASCII character 0x20 (only) to be a trailing space.

 

So, the new-line char is 0x10 and the space char is 0x20.

ASE would sort ‘a’ + new-line and ‘a’ + space as:

  [‘a<10>’, a<20>’]

 

But DA is going to ignore the space character (by default), so it effectively sees:

  [‘a<10>’, ‘a’] , KBA , BC-SYB-REP , Sybase Replication Server (standalone) , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.