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


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

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

From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: How to find not-committed transaction in SQL Server 2008 exactly?
Date 2013-04-28 11:26 +0200
Organization Erland Sommarskog
Message-ID <XnsA1B07450DFBD3Yazorman@127.0.0.1> (permalink)
References <2e7b480a-ee84-4105-a3e4-b9297e4d9835@googlegroups.com> <e3c72b49-9dce-44d7-885a-8e3db745110e@googlegroups.com>

Show all headers | View raw


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

csiph-web