Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Returning full error details from SQL Server Agent jobs Expand / Collapse
Author
Message
Posted Wednesday, September 9, 2009 9:32 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, September 18, 2014 7:03 AM
Points: 81, Visits: 903
Hi David et al,

I am the one who owes apologies, I have no idea how the tagging corrupted the article presentation, and I am sorry that this happened.

I will attempt to rectify this when I can, but it might be a couple of days or so.

Thanks!

Adam
Post #785099
Posted Thursday, September 10, 2009 6:54 AM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Today @ 3:13 AM
Points: 1,458, Visits: 3,004
You can do a quick fix - though not normally recommended to amend system tables, but the following sets all agent jobs to log to table.

UPDATE [msdb].[dbo].[sysjobsteps]
SET flags = 15


Facts are stubborn things, but statistics are more pliable - Mark Twain
Carolyn
SQLServerSpecialists
Post #785658
Posted Friday, September 11, 2009 8:10 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 10:11 AM
Points: 6, Visits: 201
If you happen to have a large number of jobs and want to change them all according to this topic; the script below should get the job done without having to manually click through each job/jobstep.

declare @Jobs table (jobId uniqueidentifier)
declare @Steps table (stepId int)
declare @jobId uniqueidentifier,
@stepId int

insert into @Jobs select job_id from msdb.dbo.sysjobs

while exists(select 1 from @Jobs)
begin
select top 1 @jobId = jobId from @Jobs
delete from @Steps
insert into @Steps select step_id from msdb.dbo.sysjobsteps where job_id = @jobId
while exists(select 1 from @Steps)
begin
select top 1 @stepID = stepId from @Steps
exec msdb.dbo.sp_update_jobstep @job_id=@jobId, @step_id=@stepId, @flags=8
delete from @Steps where stepId = @stepId
end
delete from @Jobs where jobId=@jobId
end

Post #786387
Posted Monday, December 20, 2010 4:12 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, December 20, 2010 5:25 PM
Points: 1, Visits: 2
I am on SS 2000, can't get step 6! Any help to debug a job that failed?
Post #1037440
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse