dbashley1
asked on
Stored procedures and row versioning
I have a MS SQL 2005 stored procedure that executes 4 other stored procedures. Each proceedure that executes relies on the completion of the previous in order to perform correctly. The trouble I'm having is that it appears that procedure 3 doesn't finish or commit it's work before procedure 4 runs.
If I manually execute the procedures in order everything works correctly.
My gut feeling is that this has something to do with the fact that I have row versioning turned on.
Is there a way to make sure that procedure 3 completes and commits it's data before procedure 4 executes.
If I manually execute the procedures in order everything works correctly.
My gut feeling is that this has something to do with the fact that I have row versioning turned on.
Is there a way to make sure that procedure 3 completes and commits it's data before procedure 4 executes.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the assistance. Using the combination of your suggestions, I was able to confirm that the problem was not as I suggested. There was no row versioning issue or any problems with sp3 still running and the system moving on to sp4. There was just a problem in my code. Thanks for your help.
The simple answer is, from the main procedure, can't you add a delay between the procedures?
eg
select 'starting', getdate()
waitfor delay '0:00:10'
select 'finish', getdate()
Regards
David