Microsoft KB Archive/299857

= FIX: Trigger May Not Fire if Query Plan Uses CONSTANT SCAN Operator =

Article ID: 299857

Article Last Modified on 11/5/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q299857



BUG #: 235577 (SHILOH_BUGS)



SYMPTOMS
A trigger may not fire if the query does not modify any rows and the execution plan contains the CONSTANT SCAN operator.



RESOLUTION
To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack



STATUS
Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.



MORE INFORMATION
The following code demonstrates the problem: create table table_xyz ( col_a int constraint cst_name check(col_a < 100) ) go create clustered index myidx on table_xyz(col_a) go create trigger trig_upd on table_xyz for update as print '(Trigger): Update trigger fired' go

set nocount on

-- This update will fire the trigger. print 'This will fire trigger' update table_xyz set col_a=1 where col_a > 32767 go print '' -- This update will not fire the trigger. print 'This will not fire trigger' update table_xyz set col_a=1 where col_a > 32768 go The last update query uses a CONSTANT SCAN operator; the SHOWPLAN for this query is as follows: StmtText --- |--Constant Scan

Additional query words: empty

Keywords: kbbug kbfix kbsqlserv2000sp1fix KB299857

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.