October 19, 2005 at 7:40 am
Hi
I have a stored procedure that creates automatically orderlines in a ERP system. The source is a table with 3700 lines. REsult should be 370 orders with 10 orderlines.
I started the job at 9h45 pm because it takes 100% cpu. I took a look at 7am and the task manager showed a flat line. The query analyzer was the reason.
When I stopped the stored procedure iun the query analyzer it asked le to commit the uncomitted transcations. The query was already running at least 9 hours.
I have now started the stored procedure during the daytime. The cpu showed only peaks from 40% and it did the job within half an hour.
At night there is quit some replication going on.
ANybody has any idea what could cause this ?
Kind regards
El Jefe
JV
October 19, 2005 at 8:18 am
Most likely locking or blocking between the proc and some of the nights activities, or something else...
/Kenneth
October 19, 2005 at 8:21 am
"...or something else..." Gotta love that!
You may try running sp_who2 when this is running at those different times. It is a start at determining what might be locking or blocking...
I wasn't born stupid - I had to study.
October 19, 2005 at 8:46 am
Well, considering the amount of details provided, it's sort of like 'I have a car. It won't start. What could be the problem?'
(no offense to the poster, though - but it's just as likely that it could be 'something else' as anything at all when no specifics are known.)
/Kenneth
October 19, 2005 at 8:49 am
Sorry, could post the stored procudure, but it will take about 30 pages i guess. But no offense. Result is erverything.
Thx in advance
JV
October 19, 2005 at 8:56 am
Don't get me wrong Kenneth - you were absolutely correct! (as was the poster not copying in 30 pages). It just struck me as hilarious!
I wasn't born stupid - I had to study.
October 19, 2005 at 9:03 am
Oh, no worries - lots of
As for the original question.. well... a 30 page proc, it's more than likely that it could contain just about anything that in some circumstances could conflict with just about anything.
If you're really curious, I believe that the only way to find out just what happens, is to run it again at night, while tracing the server. Dunno if it's worth the trouble though.
/Kenneth
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply