Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Max number of steps in job

Author  Topic 

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2013-07-31 : 02:05:36
Does anyone know what is the maximum number of steps in sql server agent a job?
I have one job with 34 steps and I tried adding another but it erorred out for some reason and now when I try to enter and save it I get the error:-

Drop Failed for jobstep 'runonline' (which is the last step in my job)
An exception occurred while executing a Transact-SQL statement or batch.
The transaction operation cannot be performed because there are pending requests working on this transaction. (Microsoft SQL Server, Error : 3891)

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-07-31 : 02:21:14
the error message have nothing to do with number of steps in the job. Ths problem seems to be like previous instance of job is running or transaction it started is still in pending status

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2013-07-31 : 02:33:44
Yes, one of the steps failed but I can't open the job history to check which one.
Each time I try to view the history I get timed out even when using a filter to view from yesterday to today.

Is there a table or view I can browse to check the job history another way?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-07-31 : 02:50:27
yep.. you've sysjobhistory table in msdb database

http://msdn.microsoft.com/en-us/library/ms174997.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2013-07-31 : 03:03:34
Thanks, I'll take a nosedive in there now.
Go to Top of Page

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2013-07-31 : 03:23:23
It looks like all the steps ran OK, yet the job reported back as failing?

I'm scripting the job out now to drop and re-create itself to see if that clears it.
Go to Top of Page

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2013-07-31 : 03:37:32
Update:-

Dropped the job and re-created it.

Still getting the same error message when I try to alter any step in it?
Go to Top of Page

Bill_C
Constraint Violating Yak Guru

299 Posts

Posted - 2013-07-31 : 03:53:26
Found the problem
The last step of the job was set as 'On Success Go To Next Step'

Changed it to 'On success quit reporting success' and that seems to have done the trick.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-07-31 : 04:21:40
quote:
Originally posted by Bill_C

Found the problem
The last step of the job was set as 'On Success Go To Next Step'

Changed it to 'On success quit reporting success' and that seems to have done the trick.


yep..that was it
glad that you got it sorted out.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -