Click here to Skip to main content
15,917,329 members
Home / Discussions / Database
   

Database

 
JokeRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Chris Meech18-Dec-09 7:25
Chris Meech18-Dec-09 7:25 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Xiangyang Liu 刘向阳18-Dec-09 8:35
Xiangyang Liu 刘向阳18-Dec-09 8:35 
AnswerRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) [modified] Pin
Roger Wright18-Dec-09 6:01
professionalRoger Wright18-Dec-09 6:01 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
David Skelly18-Dec-09 6:23
David Skelly18-Dec-09 6:23 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Roger Wright18-Dec-09 6:38
professionalRoger Wright18-Dec-09 6:38 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Luc Pattyn18-Dec-09 6:43
sitebuilderLuc Pattyn18-Dec-09 6:43 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Roger Wright18-Dec-09 7:09
professionalRoger Wright18-Dec-09 7:09 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Xiangyang Liu 刘向阳18-Dec-09 7:00
Xiangyang Liu 刘向阳18-Dec-09 7:00 
Roger Wright wrote:
Would it help to set the Isolation Level for the transaction to Serializable?


That's exactly what was suggested by our DBA. Howver, there is still a chance to screw up. Here is what is within the transaction:

1. Check if the record's status field is "pending".
2. If it is, then set it to "processing" and process it, otherwise return.

By reading the documentation about "serializable", it seems possible for two different clients to find the status field to be "pending", and each setting it to "processing" and each processing the same record.

However, setting isolation level to "seriablizable" greatly reduced the chance of two clients processing the same record.

Let me know if I am wrong on this. Thanks.


GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Jörgen Sigvardsson18-Dec-09 7:43
Jörgen Sigvardsson18-Dec-09 7:43 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Xiangyang Liu 刘向阳18-Dec-09 8:38
Xiangyang Liu 刘向阳18-Dec-09 8:38 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Roger Wright18-Dec-09 9:07
professionalRoger Wright18-Dec-09 9:07 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Roger Wright18-Dec-09 9:06
professionalRoger Wright18-Dec-09 9:06 
QuestionMSSQL USE Pin
MsmVc18-Dec-09 0:24
MsmVc18-Dec-09 0:24 
AnswerRe: MSSQL USE Pin
Niladri_Biswas18-Dec-09 2:59
Niladri_Biswas18-Dec-09 2:59 
GeneralRe: MSSQL USE Pin
MsmVc18-Dec-09 17:09
MsmVc18-Dec-09 17:09 
QuestionHow to work with folder and File ? Pin
Golden Jing17-Dec-09 22:18
Golden Jing17-Dec-09 22:18 
AnswerRe: How to work with folder and File ? Pin
Ashfield17-Dec-09 23:14
Ashfield17-Dec-09 23:14 
AnswerRe: How to work with folder and File ? Pin
Niladri_Biswas17-Dec-09 23:17
Niladri_Biswas17-Dec-09 23:17 
AnswerRe: How to work with folder and File ? Pin
Mycroft Holmes17-Dec-09 23:20
professionalMycroft Holmes17-Dec-09 23:20 
GeneralRe: How to work with folder and File ? Pin
Golden Jing17-Dec-09 23:35
Golden Jing17-Dec-09 23:35 
GeneralRe: How to work with folder and File ? Pin
Mycroft Holmes18-Dec-09 0:04
professionalMycroft Holmes18-Dec-09 0:04 
GeneralRe: How to work with folder and File ? Pin
Golden Jing18-Dec-09 0:07
Golden Jing18-Dec-09 0:07 
GeneralRe: How to work with folder and File ? Pin
Niladri_Biswas18-Dec-09 2:54
Niladri_Biswas18-Dec-09 2:54 
QuestionFormat function in SQL Server Pin
Tufail Ahmad17-Dec-09 18:29
Tufail Ahmad17-Dec-09 18:29 
AnswerRe: Format function in SQL Server Pin
Niladri_Biswas17-Dec-09 20:19
Niladri_Biswas17-Dec-09 20:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.