solving sql server problems for millions of dbas and developers since 2006



SQL Server DBA Tips SQL Server Developer Tips SQL Server Business Intelligence Tips SQL Server Career Tips SQL Server Whitepapers SQL Server Tools SQL Server Webcasts SQL Server Questions and Answers SQL Server Questions and Answers













Commit Transaction not commiting the transaction properly.

Asked 1/11/2012 11:48:46 AM by Vikrant More

Hi i am using MSSQLSERVER 2008.
while using Commit Transaction for the Begin Transaction it will commit it but when i check after some hours or a day it seems that there is no data which i was commited properly. when i get this i got shocked. can anyone please help me to get why this is happening ?
please help me out for this Issue..



Answered 1/11/2012 8:31:58 PM by Armando Prato (0) vote answer is useful vote answer is NOT useful

 

 

Do you have nested transactions?  Perhaps a ROLLBACK occurred somewhere along the way?  Maybe the data was legitimately deleted?  Without more info, it's hard to say.


Answered 1/12/2012 9:12:24 AM by Vikrant More (0) vote answer is useful vote answer is NOT useful

No i am not using nested transaction, same commit transaction for many times on a same table.but using commit transaction for every run of their respective begin transaction.

 


Answered 1/23/2012 9:22:30 PM by Jeremy Kadlec (0) vote answer is useful vote answer is NOT useful

Vikrant,

This is pretty hard to troubleshoot.  Have you run Profiler in an isolated environment to see what is happening?  Here are some tips on Profiler - http://www.mssqltips.com/sql-server-tip-category/83/profiler-and-trace/.

Do you also have any error handling in place that could help trap the erro?  Here are some tips on error handling - http://www.mssqltips.com/sql-server-tip-category/79/error-handling/.

HTH.

Thank you,
Jeremy Kadlec


Answered 2/3/2012 4:02:50 AM by Vikrant More (0) vote answer is useful vote answer is NOT useful

Jeremy Kadlec,

 i have not tried by profiler in an isolated environment yet. i will try and let you know.

Thanks!!


Answered 5/4/2012 7:41:08 AM by Mohan das (0) vote answer is useful vote answer is NOT useful

One thing you can do is , check from your session if there is any uncommited transaction?

select @@trancount

0-commited.

1-uncommitted.

 



Post an Answer

Keep it clean and stay on the subject or we may delete your comment.
Your email address is not published. Required fields are marked with an asterisk (*)

*Name   *Email   Notify for updates
Comments
*Enter Code refresh code


 
Sponsor Information
Try the award winning SQL diagnostic manager as a free 14-day trial!

It takes just 5 minutes to connect your SQL Databases to source control. Got 5 minutes? Get started now.

Need SQL Server help and not sure where to turn? Reach out to expert consultants for a Health Check.

Free Trial: Get Proactive Insight with SpotlightŪ for SQL Server Enterprise.

Join the over million SQL Server Professionals who get their issues resolved daily.

Free web casts for DBAs and Developers on Performance Tuning, Development, Administration and more....


Copyright (c) 2006-2012 Edgewood Solutions, LLC All rights reserved
privacy | disclaimer | copyright | advertise | about
authors | contribute | feedback | giveaways | user groups
Some names and products listed are the registered trademarks of their respective owners.


Edgewood Solutions LLC | MSSharePointTips.com | MSSQLTips.com