SAP Knowledge Base Article - Preview

1866748 - Error: data length mismatch in ct_fetch() when executing optdiag utility on Linux - ASE


  • On Linux platforms, particularly when using BASH shell, execution of ASE optdiag utility fails
  • Error occurs while generating key column histogram data and is visible in the optdiag output file:

Internal error: data length mismatch in ct_fetch().
CTLIB Message:  - L4/O2/S6/N36/6/0:
ct_send(): protocol specific layer: internal Client Library error: There is a tds state machine error. An illegal tds token sequence was received

Optdiag failed.  Check for error messages above.



  • SAP Adaptive Server Enterprise (ASE)
  • Linux OS platform with default LANG = en_US.UTF-8


SAP Adaptive Server Enterprise all versions


KBA , environment variable , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , Bug Filed

About this page

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

Search for additional results

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