SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL agent failed job detailed informtion???


SQL agent failed job detailed informtion???

Author
Message
Lavanyasri
Lavanyasri
SSC-Addicted
SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)

Group: General Forum Members
Points: 427 Visits: 944
Hi Team,

We configured different jobs in each sever(full,diff,tlog,dbcc and rebuild \reord,history cleanup jobs).

We are getting alerts when the job is failed is as follows ::

The job failed in the server XXXXXXXX on Nov 14 2012 2:15AM.Please refer the log file for detail information.

We need to search each and evry job to find which job is failed ??.
Is it possible to get a failure alert with the job name , then it is easy to resolve the issue quickly.

I dont have much knowledge on scrpting side ...........

Thanks,
Lavanya
anthony.green
anthony.green
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10440 Visits: 6378
http://www.sqlmag.com/article/tsql3/have-sql-server-email-you-error-messages-generated-by-job-failures

You will need to add a step to the end of every job which is got to by the on failure action of the other steps in the job but this is what we use to get job failure emails.



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
When a question, really isn't a question - Jeff Smith
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger


Lavanyasri
Lavanyasri
SSC-Addicted
SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)SSC-Addicted (427 reputation)

Group: General Forum Members
Points: 427 Visits: 944
Hi Anthony,


Thanks for the quick response ..
I don't want the error message generated by that job failure . I want only the job name with the failure alert ........
anthony.green
anthony.green
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10440 Visits: 6378
You get an email which contains the below


Job Name = Staging_Circle.MergeResourceToProcessWithResources
--------------------------------------
Step name = Circle.MergeResourceToProcessWithResources
DB Name = Staging_Database
Run Date = Nov 14 2012 11:08AM
Error = Unable to connect to SQL Server 'SQL01\INSTANCE01'. The step failed.

Command = EXEC Circle.MergeResourceToProcessWithResources



You can obivously just go into the procedure and strip out the call to the part which gets the error and command, or use the script as a base point and create your own.



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
When a question, really isn't a question - Jeff Smith
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger


Bhuvnesh
Bhuvnesh
SSCertifiable
SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)

Group: General Forum Members
Points: 5514 Visits: 4076
Lavanyasri (11/15/2012)
I don't want the error message generated by that job failure . I want only the job name with the failure alert ........
you can use
dbo.sysjobhistory  and dbo.sysjobs 

table to see which job is failing and why

-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
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