TheCommunicator
asked on
row level locking on sql server
Hello people,
here is the scenario: We have a message queue and we are processing that queue in multiple threads. Now each thread will take 25 email addresses from a particular table and then process it. So we are looking for a mechanism which actually provides us facility to lock a particular row in the table, once thread has picked it up for processing. We thought about setting a bit manually but select statement on TOP(25) and then update on the same row would be very time consuming in a sense what if another thread comes in and picks up the thread.
Any suggestions?
Thanks
here is the scenario: We have a message queue and we are processing that queue in multiple threads. Now each thread will take 25 email addresses from a particular table and then process it. So we are looking for a mechanism which actually provides us facility to lock a particular row in the table, once thread has picked it up for processing. We thought about setting a bit manually but select statement on TOP(25) and then update on the same row would be very time consuming in a sense what if another thread comes in and picks up the thread.
Any suggestions?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER