SAP Knowledge Base Article - Preview

2735887 - Insert LOB from MSSQL shutdown DSI with Msg 156 incorrect syntax near the keyword 'where' - SRS


  • Replication is from Microsoft SQL Server (MSSQL) to SAP Adaptive Server Enterprise (ASE) using SAP Replication Server (SRS)
  • The topology is listed below:
    • MSSQL -> RepAgent MSSQL (RAM) -> SRS -> ASE
  • A LOB column is defined as nvarchar(max) in MSSQL & rs_msss_nvarchar_max  in the SRS replication definition.
  • Insert of large xml data (> 4096 bytes) causes the following DSI EXEC error:
    • Message: 156, State 2, Severity 15 -- 'Incorrect syntax near the keyword 'where'



  •  SAP Replication Server Option (RSO) for Microsoft SQL Server 15.7.1
  •  SAP Replication Server Heterogeneous Edition (RSHE) 15.7.1 & 16.0
  •  SAP Replication Server (SRS) 15.7.1 & 16.0
  •  SAP Adaptive Server Enterprise (ASE) 15.7 & 16.0


SAP Replication Server 15.7 ; SAP Replication Server 16.0 ; SAP Replication Server, heterogeneous edition 16.0 ; SAP Sybase Replication Server 15.7, heterogeneous edition ; SAP Sybase Replication Server 15.7, option for Microsoft SQL Server


nvarchar(max); rs_msss_nvarchar_max; unitext; text, image, partial lob updates; , KBA , BC-SYB-REP-RSO , Rep Server Options (RSO) , BC-SYB-REP-HET , Replication Server Heterogeneous Edition (RSHE) , BC-SYB-REP , Sybase Replication Server (standalone) , 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.