title: How to stop a process in MS SQL Server?
body: <p>I have some processes that are taking long time to terminate.</p>
  
  <p>I had run q query that took 30 hours "I forgot about it" so I killed it using "kill id" but it has been trying to roll back for more than 30 hours already.</p>
  
  <p>Can someone please tell me how can I force this to stop?</p>
  
  <p>when I run this query</p>
  
  <pre><code>select
      p.spid
  ,   right(convert(varchar, 
              dateadd(ms, datediff(ms, P.last_batch, getdate()), '1900-01-01'), 
              121), 12) as 'batch_duration'
  ,   P.program_name
  from master.dbo.sysprocesses P
  where P.spid &gt; 50
  and      P.status not in ('background', 'sleeping')
  and      P.cmd not in ('AWAITING COMMAND'
                      ,'MIRROR HANDLER'
                      ,'LAZY WRITER'
                      ,'CHECKPOINT SLEEP'
                      ,'RA MANAGER')
  order by batch_duration desc
  </code></pre>
  
  <p>I get the following results </p>
  
  <pre><code>61  23:40:48.893    Microsoft SQL Server Management Studio - Query                                                                                  
  51  23:33:03.410    Microsoft SQL Server Management Studio - Query                                                                                  
  58  23:01:08.960    Microsoft SQL Server Management Studio - Query                                                                                  
  55  20:45:41.953    Microsoft SQL Server Management Studio - Query                                                                                  
  64  19:08:37.310    Microsoft SQL Server Management Studio - Query                                                                                  
  62  00:00:05.207    Microsoft SQL Server Management Studio - Query    
  </code></pre>
  
  <p>When I run kill 61 I get the following
  SPID 61: transaction rollback in progress. Estimated rollback completion: 0%. Estimated time remaining: 0 seconds.  (this has been the case for the past 24 hours!)</p>
  
  <p>What can I do to fix this problem?</p>
  
  <p>Thanks</p>