I am developing a console application. After doing the initial checks and pre requisites, i have to introduce 5 threads based on the sql table's rows. say for example, if my table consist of 1000 rows, then i will have to split up the rows and assign equally to all 5 threads, where in this case, i will do the split and assign (creating a datatable) 200 rows to each thread and then all 5 threads would call the SP at the same time with the datatable. Is there any thing to be handled in the SP, since it is going to get executed parallely by 5 threads and how can i handle the insert, delete and truncates inside the SP? will it be a problem, if more than one insert or delete or truncate queries executed at the same time, is there any collision occurs? or is there any lock functionality in SP to allow only one operation for a sql statement in SP?
As i am new to this to kind of requirement, i need help in finding out the problems which is occurs possibly and way to overcome it. it would be great if i get any tips and tricks to follow in this kind of scenario..
Thanks in advance..