Would it be possible to mark an tab that has a open (not commited / rolled back) transaction e.g. by changing the title, showing an Icon or using a red/yellow blinking background color (no, not really Image may be NSFW. Clik here to view. ![]() Reason one: A few days ago I tested some stuff to simulate blocking situations and executed an explicit BEGIN TRANSACTION. Somehow I forgot to COMMIT it after I was done with my tests (which was no problem, since I touched not really something). Some hours later I wanted to test a really big procedure (~2-3 hours runtime) and reused the window with the still open transaction (just deleted the old code without reading it again), which results in much locks on many tables (only on a test-copy of the database) and a full transaction log file on the TempDB (never tought, that this could be possible) which made the whole server unusable. To make it worser I started the master.dbo.sp_WhoIsActive procedure (by Adam Machanic) in the same SSMS window (the big procedure was done) as soon I saw the TempDB-Transaction-Log mails flooding my inbox, but sp_WhoIsActive did not come back (I guess because of the TempDB). So I did the next mistake and pressed the Stop button, which resulted in a 1-hour-rollback of the whole big procedure... Reason two: Sometimes I execute a BEGIN TRANSACTION, run a few other commands that would be executed successfull, until I run onto an error and the whole transaction was rolled back (of course not for every error and of course without telling me something about the silent rollback). This could be ok, but when it is an uncritical error, which I want to ignore, so I run some more commands, believing, that I'm still in my explicit transaction and could roll back everything -> data garbage that could not be rolled back... Solution:
PS: to solve the TempDB problem I executed an ALTER DATABASE ADD FILE command (the SSMS-GUI could not be used, since it uses the TempDB too). |
Image may be NSFW. Clik here to view. ![]() |