Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Agent Job slows down

Status
Not open for further replies.

cmdematos

IS-IT--Management
Mar 7, 2001
29
US
Hello all,

I have a long running job that I kick off from SQL Agent. The job opens a cursor (6 rows only) and performs its work on one row at a time, calling a set of stored procedures.

When fired from SQL Query Analyzer the job each row in the cursor takes 8 minutes to process, or, 48 minutes for the 6 rows returned in the cursor.

When fired from SQL Agent as a job, this takes 6 hours to run.

Whats causing this delay?

Carlos De Matos
 
Is it possible there are other processes running at the same time as the job that are causing the server to be overloaded?
 
2 hours vs 6 hours on the same query is unlikely to happen unless, like fluteplr said, there are other processes running at the same time, and probably blocking your process. There must be some extra steps in the SQL Agent job and not only this. Look at the Job and see how many steps is in there. There should be only 1. And double check if it is really executing the same query.




Andel
andel@barroga.net
 
I have a related problem. A sql statement takes 17 sec thru ODBC, and in query analyzer it take 2 sec. But then other questions agains the database performes the same with query analyzer/thru ODBC.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top