sql - Strategies to issue unique records via db? -


We have more than 1 instance of a fixed exe running from different locations. An XE should bring a set of records and do some work on their basis. The set of records received from Exe A. should not be obtained in exe B and vice versa. Ax A and A B is the same; The number of instances they are running from different places may increase or decrease. All exes can run simultaneously on time.

So my question is coming ... What is the best way to deal with this problem?

I have thought about using the transaction but the table which acts as the source of XE is also used by others (scheduling work, website, etc.). Enter the data in the work source table.

However, if I have to use a transaction I can start a transaction with BEGIN TRAN and then select the data from the source table using the TABLOCKX signal. If I used to do such ideas, then it would affect the actual underlying tables / tables.

I have to know now what strategies to deal with this ...

< P> You want to avoid running conditions between procedures. My answer is detailed here:

Transaction is not of high use: it's a locking strategy that you think about, with knock on effect on concurrency.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -