Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-02-25 : 08:27:53
|
| jyo writes "hi,I have a table which stores some user details like email, name and Flag.Now currently we have a stored procedure which runs on the table and selects all the records from this table where flag=0 processes these records and sets the flag to 1. This process is working fine.But now we want to deploy this service on multiple servers meaning this procedure should be called on say two different servers. The procedures will now be modified to say select first top 100 records and process them and then update the flag to 1. simultaneously if the same proc is called from another server then the 100 records selected by the first server should not be selected by the proc called by the second server.I am sorry if i m not clear.any pointers will be helpful..thanks for the replies.jyo." |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-02-25 : 08:49:07
|
well one option is to set the status to 2 when it's processing.that way you select only rows with status 0 when calling an sproc.Go with the flow & have fun! Else fight the flow |
 |
|
|
|
|
|