Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Titre:
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.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement