Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


agent job failing with two steps


agent job failing with two steps

Author
Message
rjdineen
rjdineen
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 42
Hello everyone

I have an agent job with two steps,

when i run the top step it completes with the second not running at all.

But if i run the agent job specifing the second step to run

That also completes. Is there something obvious i can check?

Kind Regards

Rob
John Mitchell-245523
John Mitchell-245523
SSCertifiable
SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)

Group: General Forum Members
Points: 7444 Visits: 15128
Rob

Check that the first step not configured to "quit the job reporting success" when it succeeds. You need it to be configured to "go to the next step".

John
rjdineen
rjdineen
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 42
Hi John

Yes first step is set to as suggested

Is there anything else i could check?
John Mitchell-245523
John Mitchell-245523
SSCertifiable
SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)

Group: General Forum Members
Points: 7444 Visits: 15128
Rob

Please run these two queries and post the results:

SELECT
s.step_id
, s.on_success_action
, s.on_success_step_id
, s.on_fail_action
, s.on_fail_step_id
FROM
msdb..sysjobs j
JOIN
msdb..sysjobsteps s
ON
j.job_id = s.job_id
WHERE
j.name = '<Job_Name>'

SELECT TOP (15)
h.step_id
, h.run_date
, h.run_time
, h.run_status
FROM
msdb..sysjobs j
JOIN
msdb..sysjobhistory h
ON
j.job_id = h.job_id
WHERE
j.name = '<Job_Name>'
ORDER BY
run_date DESC
, run_time DESC


John
rjdineen
rjdineen
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 42
1 3 0 2 0
2 1 0 2 0


0 20120404 133708 1
2 20120404 133708 1
2 20120404 133411 1
0 20120404 133407 1
1 20120404 133407 1
0 20120404 133254 1
2 20120404 133254 1
2 20120404 133123 1
1 20120404 133120 1
0 20120404 133120 1
2 20120404 132953 1
0 20120404 132950 1
1 20120404 132950 1
2 20120404 132713 1
0 20120404 132709 1
John Mitchell-245523
John Mitchell-245523
SSCertifiable
SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)

Group: General Forum Members
Points: 7444 Visits: 15128
Rob

From those results, it looks as if step 2 runs every time the job runs - for the last five executions, certainly. What makes you think step 2 isn't running after step 1 runs?

John
rjdineen
rjdineen
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 42
Each step is a seperate ssis package. and each package has data flow and email tasks.

Both data flow extract data out to a csv file. Then sent out via email.

I am included on both the emails.
John Mitchell-245523
John Mitchell-245523
SSCertifiable
SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)SSCertifiable (7.4K reputation)

Group: General Forum Members
Points: 7444 Visits: 15128
Then your package is not working properly, or maybe the e-mail that you don't get is filtered out by Mimesweeper or whatever you have on your mail system. Perhaps something that happens in the first package stops the second package from sending the e-mail. But if you look in the job history, you'll see that step 2 runs every time.

John
rjdineen
rjdineen
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 42
I understand what you are saying,

but both packages run when i specify them seperately via agent job.

ie i recieve all emails. very strange
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search