May 3, 2012 at 12:35 am
How to fix this error ?
Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements.
I am using cursors to generate a dynamic merge for SCD Type 1 and Type 2. How would be the performance of the SP when there are more than 10000 rows ?
How can I optimize or fine tune the Stored Procedure ?
Any suggestions are welcome.....
May 3, 2012 at 1:14 am
you are going to have to supply more information, perhaps your table structure and the code.
You may also want to re-think using cursors and rather try approach it in a set based way
May 3, 2012 at 6:25 am
after running your SP and getting the error check @@TRANCOUNT and see what you have. i would guess you have a commit in the code some where it should not be or forgot a commit some where. Or you may have the following code on accident.
BEGIN TRANSACTION
ROLLBACK
COMMIT
lots of things could be going on here and with out the code of the SP not much else we could do.
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply