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.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Get different rows by different processors

Author  Topic 

pranaysharmadelhi
Starting Member

1 Post

Posted - 2011-04-24 : 18:56:44
The application runs several processors that get a group of rows from SQL Server 2008 database and processes the records. There can be several scenarios where multiple processors access at the same time.
I would like to define a stored procedure that could use some kind of transaction to give only n number of rows per processor and then discard the rows once given so they multiple processors dont get the same row to process. I was thinking of selecting 100 rows and then updating a bit field, but not sure if 2 processors request at the same time what would happen. Please suggest an architecture to meet this requirement.
   

- Advertisement -