[dba-SQLServer] There are uncommitted transactions

jwcolby jwcolby at colbyconsulting.com
Fri Jul 27 07:35:42 CDT 2012


Is Tran an acceptable abbreviation or was that just an aircode thing?

John W. Colby
Colby Consulting

Reality is what refuses to go away
when you do not believe in it

On 7/27/2012 8:03 AM, Francisco Tapia wrote:
> I like to name my transactions
> So when I write it I do it like this:
>
>> Begin Tran t1
>> Do stuff
>> Do more stuff
> If some stuff begin
>> Commit Tran t1
> End
> Else begin
> Rollback tran t1
> End
>
> In this way I know that what I've wrapped up is actually committed (or
> rolled back when some criteria is not met.)
>
>
>
> Sent from my mobile device
>
> On Jul 27, 2012, at 4:26 AM, jwcolby <jwcolby at colbyconsulting.com> wrote:
>
>> SQL Server appears to be hanging for a batch job.  I am wrapping a group of processes in a transaction.  It processes dozens of these things then... suddenly it stops.  I cannot get it to start again.  If i exit SSMS it pops up a message:
>>
>> "there are uncommitted transactions.  Do you wish to commit these transactions before closing the window?"
>>
>> I say yes, it performs a commit, and I can go right back in to SSMS and start up this process and it takes off and runs.
>>
>> So what is SSMS doing to commit these "uncommitted transactions"?  And can I do that same thing in TSQL?
>>
>> I wrap the transaction group in a
>>
>> Begin Transaction
>> Do stuff
>> Do more stuff
>> Commit
>>
>> What more is there?
>>
>> --
>> John W. Colby
>> Colby Consulting
>>
>> Reality is what refuses to go away
>> when you do not believe in it
>>
>> _______________________________________________
>> dba-SQLServer mailing list
>> dba-SQLServer at databaseadvisors.com
>> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
>> http://www.databaseadvisors.com
>>
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
>
>



More information about the dba-SQLServer mailing list