SAP Knowledge Base Article - Preview

2499280 - SAP Startup fails with SQL error 102 incorrect syntax near 'execute'

Symptom

The startup of a SAP system does not work due to the following error in the developer trace:

C  ERROR: -1 in function ExecuteAndFlush (SQLExecDirect) [line 7543]
C  (102) [42000] [Microsoft][SQL Server Native Client 11.0][SQL Server]Incorrect syntax near 'execute.'.
C  <if user_name() != 'PRD' execute as login = suser_sname(suser_sid('PRD')) with no revert> failed -- connect terminated
B  ***LOG BY2=> sql error 102    performing CON [dbsh         1246]
B  ***LOG BY0=> Incorrect syntax near 'execute.'. [dbsh         1246]
B  ***LOG BY2=> sql error 102    performing CON [dblink       544]
B  ***LOG BY0=> Incorrect syntax near 'execute.'. [dblink       544]
M  ***LOG R19=> ThInit, db_connect ( DB-Connect 000256) [thxxhead.c   1559]

Consider for the above example , the SID of the system is PRD and the database schema is prd


Read more...

Environment

SAP Netweaver based systems;
MS SQL Server 2008 and higher;

Product

SAP NetWeaver all versions

Keywords

Incorrect syntax near 'execute.' if user_name() !=  execute as login = suser_sname(suser_sid( sql error 102   , KBA , BC-DB-MSS , SQL Server in SAP NetWeaver Products , Problem

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.