I have a SP that will not work when I have the queries in it surrounded by...
BEGIN TRAN
blah - blah - blah
IF @ERROR ROLLBACK TRAN
COMMIT TRAN
The proc seems to run indefinitely and there are tons of locks on the database it's using. If I remove all the TRAN lines (comment them out) the PROC runs in less than 3:00 minutes.
I'm thinking it's some sort of corruption but I need some evidence to present to my superiors.
Anyone have any ideas?
BEGIN TRAN
blah - blah - blah
IF @ERROR ROLLBACK TRAN
COMMIT TRAN
The proc seems to run indefinitely and there are tons of locks on the database it's using. If I remove all the TRAN lines (comment them out) the PROC runs in less than 3:00 minutes.
I'm thinking it's some sort of corruption but I need some evidence to present to my superiors.
Anyone have any ideas?