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

SQL agent failed job detailed informtion??? Expand / Collapse
Author
Message
Posted Thursday, November 15, 2012 2:33 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, September 30, 2013 6:11 AM
Points: 204, Visits: 762
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


Post #1385020
Posted Thursday, November 15, 2012 2:39 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 4:32 AM
Points: 5,142, Visits: 4,936
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
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

Post #1385021
Posted Thursday, November 15, 2012 3:06 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, September 30, 2013 6:11 AM
Points: 204, Visits: 762
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 ........
Post #1385030
Posted Thursday, November 15, 2012 3:16 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 4:32 AM
Points: 5,142, Visits: 4,936
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
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

Post #1385033
Posted Thursday, November 15, 2012 3:28 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 1:45 AM
Points: 2,836, Visits: 3,952
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
Post #1385043
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse