Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locking a Record
Message
De
09/09/2014 14:43:33
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
 
À
09/09/2014 14:01:16
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2014
Application:
Web
Divers
Thread ID:
01607215
Message ID:
01607223
Vues:
38
>>I need to retrieve a record out of a queue, and I want to lock it to make sure that only one user retrieves and is working on a record at a time.
>>
>>I don't think this is a complicated concept, but I've never done it before. Can somebody give me a crash course on what I'm looking for? I'm going to have a status on the record of Pending/Done I think to explicitly mark that the record has been processed, but I need to work on the locking part. This is the requirement that was provided to me:
>>
>>This action must be safe across multiple webservers, meaning no 2 users could possibly receive the same row at the same time (atomic operation? Cross-database locking?)
>
>I want to make sure I understand something first. You say "no 2 users could possibly receive the same row at the same time".
>
>Do you mean that no 2 users could retrieve the row, just for viewing? Or that 2 users can't update the same row, where both retrieved it, one updated, and then a second tried to update with a "dirty" update?

What I have is a lead sharing tool where a person clicks a button to say Get Lead, calls them, follows up, whatever. I just want to make sure that no more than one representative can receive/process the same lead even if they click on the same button at the exact same time. It's web farm scenario also, so the solution has to take that into consideration.
Very fitting: http://xkcd.com/386/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform