SAP Knowledge Base Article - Preview

2351066 - Why is @@procid variable not zero for ad-hoc queries?

Symptom

Triggers were written to check @@procid to determine if they were being fired by a stored procedure.
@@procid would have the object id of that procedure,  or a value of zero for ad-hoc SQL.
However, @@procid is now always showing a non-zero value.


Read more...

Environment

  • SAP Adaptive Server Enterprise (ASE)
  • SAP Adaptive Server Enterprise Cluster Edition (ASE CE)

Product

SAP Adaptive Server Enterprise 12.5 ; SAP Adaptive Server Enterprise 15.7 ; SAP Adaptive Server Enterprise 15.7 Cluster Edition ; SAP Adaptive Server Enterprise 16.0 ; Sybase Adaptive Server Enterprise 12.5 ; Sybase Adaptive Server Enterprise 15.0 ; Sybase Adaptive Server Enterprise 15.5 ; Sybase Adaptive Server Enterprise Cluster Edition 15.0 ; Sybase Adaptive Server Enterprise Cluster Edition 15.5 ; Sybase Adaptive Server Enterprise Cluster Edition 15.7

Keywords

sybase, @@procid, LWP, statement cache, trigger, literal autoparam, object id, procedure cache. , KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , BC-SYB-ASE-CE , ASE Cluster Edition (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.