FIX: Sysprocesses Is Incorrectly Showing Rollback Status Even Though the Transaction Is Not Rolling Back

This article was previously published under Q289691
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 352036 (SHILOH_BUGS)
Under normal processing conditions, sysprocesses output may show system process IDs (SPIDs) with a status of Rollback when that transaction is not truly being rolled back but is, in fact, being committed. You can see this Rollback status when the CMD column indicates INSERT, UPDATE, or COMMIT TRAN.
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft SQL Server 2000 Service Pack 1.

Steps to Reproduce Behavior

  1. Open two windows in Query Analyzer.
  2. On the first window, start the following query that monitors for a status of Rollback:
    while 1=1begin  declare @time datetime  select @time = getdate()  if exists (select * from master.dbo.sysprocesses where status = 'rollback')  select @time as CurrentTime,status,*     from master.dbo.sysprocesses where status = 'rollback'  waitfor delay '00:00:05'end					
  3. On the second window, start the following query to loop through the code until the query in the first window captures the problem:
    use pubscreate table test(col1 int)godeclare @i int select @i =1 while @i < 100000begin   insert into test values('1')  select @i= @i+1endgodrop table testgo					
  4. When you observe the problem, stop both queries by either pressing the CONTROL-C keyboard combination, or by clicking the red STOP button in Query Analyzer.

    In the results, note that the SPID has a status of Rollback, although the data has been inserted in the database. Also note that the waittype shows 0x0081 (waiting on writelog) while the status is Rollback.

Article ID: 289691 - Last Review: 01/16/2015 21:40:36 - Revision: 3.2

  • Microsoft SQL Server 2000 Standard Edition
  • kbnosurvey kbarchive kbbug kbfix kbsqlserv2000sp1fix KB289691