• OP,

    I am just curious ... how do you know step 1 takes 10 minutes? Is there some way that you actually know that or is it an assumption based on something else?

    If you can read from table B, but just not the records expected to be deleted, that would indicate that your time estimates are off and that the step in question has already been completed. As has been stated, the 2nd statement will not execute until the 1st has completed. If you can't read from table B in general because it is locked that is a separate issue.

    Personally I like using SSIS for ETL tasks like you're describing rather than using single procs that perform many separate tasks. For each separate action I use a distinct step and if I have any issues I can easily discover exactly how long each step is taking and where the errors are. Some of this advantage could be had merely by separating the statements into separate procs and then calling the procs in order via the job. Of course, there are times when the code needs to be kept together and your case could very well be one of those times.

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]