General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Title:
Sql Server Agent Jobs running slow
I am working with SQL 7 service pack 4.0. and are running several stored procedures through Sql Server Agent Jobs to run at the weekend. Several of the stored procedures are running approximately 100 times slower when run through SQL Server Agents Jobs. Each stored procedure that has a problem uses cursors.
For example one of my stored procedures takes 3 minutes when run on SQL Query Analyzer and six hours when run through SQL Server Agents Jobs. I have run it through Query Analyzer on my own pc as well as through Query Analyzer on the server box.
Does anyone have any idea why this might be happening and any potential solutions? I know that cursors are slow but I don't understand why there should be a vast difference in speed between Query Analyzer and SQL Server Agent Jobs. To perform the data manipulation in SQL I need to use cursors.
Any suggestions would be appreciated.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only