patternsqlMinor
SQL server 2000 transactions with the same time
Viewed 0 times
2000thesamesqlwithtimeservertransactions
Problem
I have a BIG problem here.
I'm creating a program that can be looping if the connection to the server is broken.
But when the program is running for a few months, I found a bug on
I found some data that had more than one transaction with the same date and time.
Is it possible that
PS : I use
Hope there's explanation and solution for my problem.
I'm creating a program that can be looping if the connection to the server is broken.
But when the program is running for a few months, I found a bug on
SQL server 2000.I found some data that had more than one transaction with the same date and time.
Is it possible that
sql2k server has a transaction with the same date and time in one table?PS : I use
getdate to fill that field.Hope there's explanation and solution for my problem.
Solution
It won't be a bug: it's a flaw in your logic.
If you're looping, then it's possible that you are opening transactions on top of another transactions. That is,
In your loop, in client code, you should test for an open transaction and rollback. Or use
It's hard to be more precise at this stage.
If you're looping, then it's possible that you are opening transactions on top of another transactions. That is,
@@TRANCOUNT keeps incrementing. You may be incorrectly looping on say, a client timeout, that doesn't actually disconnect.In your loop, in client code, you should test for an open transaction and rollback. Or use
SET XACT_ABORT ON to force full rollbacks. See https://stackoverflow.com/questions/917773/do-i-really-need-to-use-set-xact-abort-on/919279#919279 for moreIt's hard to be more precise at this stage.
Context
StackExchange Database Administrators Q#33329, answer score: 3
Revisions (0)
No revisions yet.