Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #1465

Re: How to find not-committed transaction in SQL Server 2008 exactly?

Newsgroups comp.databases.ms-sqlserver
Date 2013-05-05 20:35 -0700
References <2e7b480a-ee84-4105-a3e4-b9297e4d9835@googlegroups.com> <e3c72b49-9dce-44d7-885a-8e3db745110e@googlegroups.com> <XnsA1B07450DFBD3Yazorman@127.0.0.1>
Message-ID <5ebd7255-4062-4229-88ef-20f55934e447@googlegroups.com> (permalink)
Subject Re: How to find not-committed transaction in SQL Server 2008 exactly?
From Peng Liu <liupengwyy@gmail.com>

Show all headers | View raw


According to your reply, do you mean that there might exist open transactions even the result of DBCC OPENTRAN indicates no active open transaction?

From the step I list, can you find that there is still open transaction? from which step?

From the result of "select spid, lastwaittype, last_batch, status, open_tran, cmd, sql_handle from sys.sysprocesses where spid = 53;", the status value is sleeping, what does the "sleeping" mean?

On Sunday, April 28, 2013 5:26:03 PM UTC+8, Erland Sommarskog wrote:
> Peng Liu (liupengwyy@gmail.com) writes:
> 
> > 6. Finally, I run "DBCC OPENTRAN;", and get below: No active open
> 
> > transactions. DBCC execution completed. If DBCC printed error messages,
> 
> > contact your system administrator. 
> 
> > 
> 
> > So, according to what I test above, before step 6, it seems that there
> 
> > is one transaction which is not committed, the session 53 has one
> 
> > transaction (the "open_tran" value is 1), the status is "sleeping"; 
> 
> > However, step 6 also show that no transaction is not committed. They
> 
> > seems conflict. 
> 
> 
> 
> I don't think so. Books Online says in the Remarks section for DBCC 
> 
> OPENTRAN:
> 
> 
> 
>    Use DBCC OPENTRAN to determine whether an open transaction exists within 
> 
>    the transaction log.
> 
> 
> 
> You have a transaction that this far has only read data, but has not 
> 
> performed any updates. Therefore it is not preventing the log from being 
> 
> truncated.
> 
> 
> 
> > Besides, for the query text from step 5, is it possible for me to know
> 
> > the exact value of the parameters P1, P2 and P3? 
> 
> 
> 
> Only if you have a trace running which captures the statement.
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
> 
> 
> 
> Links for SQL Server Books Online:
> 
> SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
> 
> SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

How to find not-committed transaction in SQL Server 2008 exactly? Peng Liu <liupengwyy@gmail.com> - 2013-04-27 00:11 -0700
  Re: How to find not-committed transaction in SQL Server 2008 exactly? Erland Sommarskog <esquel@sommarskog.se> - 2013-04-27 11:42 +0200
  Re: How to find not-committed transaction in SQL Server 2008 exactly? Peng Liu <liupengwyy@gmail.com> - 2013-04-27 19:57 -0700
    Re: How to find not-committed transaction in SQL Server 2008 exactly? Erland Sommarskog <esquel@sommarskog.se> - 2013-04-28 11:26 +0200
      Re: How to find not-committed transaction in SQL Server 2008 exactly? rja.carnegie@gmail.com - 2013-04-28 03:49 -0700
      Re: How to find not-committed transaction in SQL Server 2008 exactly? Peng Liu <liupengwyy@gmail.com> - 2013-05-05 20:35 -0700
        Re: How to find not-committed transaction in SQL Server 2008 exactly? Erland Sommarskog <esquel@sommarskog.se> - 2013-05-06 07:16 +0000
          Re: How to find not-committed transaction in SQL Server 2008 exactly? Peng Liu <liupengwyy@gmail.com> - 2013-05-06 18:40 -0700
            Re: How to find not-committed transaction in SQL Server 2008 exactly? Erland Sommarskog <esquel@sommarskog.se> - 2013-05-07 21:12 +0200
  Re: How to find not-committed transaction in SQL Server 2008 exactly? Peng Liu <liupengwyy@gmail.com> - 2013-04-28 00:52 -0700
  Re: How to find not-committed transaction in SQL Server 2008 exactly? Peng Liu <liupengwyy@gmail.com> - 2013-05-05 20:31 -0700
  Re: How to find not-committed transaction in SQL Server 2008 exactly? work4anvesh@gmail.com - 2015-08-26 10:47 -0700
  Re: How to find not-committed transaction in SQL Server 2008 exactly? work4anvesh@gmail.com - 2015-08-26 10:48 -0700
  Re: How to find not-committed transaction in SQL Server 2008 exactly? johnsonwelch2@gmail.com - 2016-04-14 01:46 -0700

csiph-web