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»»

Nightly Failed Jobs Report Expand / Collapse
Author
Message
Posted Sunday, September 15, 2002 12:00 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, June 6, 2014 2:06 PM
Points: 1,040, Visits: 277
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/glarsen/failed_jobs.asp

Gregory A. Larsen, MVP

Need SQL Server Examples check out my website at http://www.sqlserverexamples.com
Post #6801
Posted Sunday, September 15, 2002 6:47 PM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: Moderators
Last Login: Yesterday @ 9:08 AM
Points: 6,800, Visits: 1,916
Greg, thats a great idea, wish I had thought of it! Im getting to that point, lots of jobs and lots of email, and beyond that processes that run on various non SQL machines that still have to be monitored. This is a good start. Only question I had was do you need global temp table rather than plain?

Andy
http://www.sqlservercentral.com/columnists/awarren/




Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
Post #41618
Posted Monday, September 16, 2002 2:05 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, March 20, 2006 2:11 AM
Points: 59, Visits: 1
quote:
Only question I had was do you need global temp table rather than plain?

Andy



I have found that xp_sendmail does not like accessing standard temp tables that were created outside of it. I presume that this is caused by xp_sendmail running as a seperate connection, and therefore being unable to access the temp table that the job has created. I find that a similar problem occurs with variables.

Have you any suggestions as to how this difficulty might be overcome? (or, failing that, a better understanding of what might be causing this?)

Dave.



Post #41619
Posted Monday, September 16, 2002 7:58 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, June 6, 2014 2:06 PM
Points: 1,040, Visits: 277
Dave's explaination is exactly the reason why I used a global temp table.

Dave I think you are right on regarding a different connection. I think this is because you could be logged on as user "XYZ123", but when you run xp_sendmail it runs under the MSSQLSERVER account to send the mail. Therefore a new connection "must" be established to send the mail.

-------------------------
Gregory Larsen, DBA

If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples


Gregory A. Larsen, MVP

Need SQL Server Examples check out my website at http://www.sqlserverexamples.com
Post #41620
Posted Tuesday, September 17, 2002 9:57 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 16, 2003 12:00 AM
Points: 1, Visits: 1
Greg

I required a similar solution to monitor failing jobs, but across multiple SQL Servers. I ended up writing a script using SQLDMO to get this done. I don't think you would be able to do this using TSQL unless you used linked servers (which wasn't possible in my environment).

Good article.
Regards
Julian




Post #41621
Posted Wednesday, September 18, 2002 7:38 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, June 6, 2014 2:06 PM
Points: 1,040, Visits: 277
Good Idea. I'm working on retrofitting my report process and other automated DBA process to run from a single server and monitor multple servers. I also am having problems getting it to work across all our servers. Maybe I'll consider re-writing in SQLDMO. Thanks for the tip.....

Gregory Larsen, DBA

If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples


Gregory A. Larsen, MVP

Need SQL Server Examples check out my website at http://www.sqlserverexamples.com
Post #41622
Posted Thursday, September 19, 2002 5:59 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, September 14, 2005 11:02 AM
Points: 114, Visits: 1
We do a similar thing - check several different servers for failed jobs nightly. We have one job on a master server that queries MSDB on the other servers (yes, we use linked servers). Each step in the job runs the query on a different server and appends the results to a text file. The last step is to mail the text file.

It's simplistic, but pretty easy to maintain and use. If anyone wants the code, let me know.

Betsy
birdies95@hotmail.com



Post #41623
Posted Thursday, September 19, 2002 6:13 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: Moderators
Last Login: Yesterday @ 9:08 AM
Points: 6,800, Visits: 1,916
If its not too long, post the code here, or you can add to the script library.

Andy
http://www.sqlservercentral.com/columnists/awarren/




Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
Post #41624
Posted Thursday, September 19, 2002 6:49 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, September 24, 2013 4:16 AM
Points: 1,828, Visits: 9
We do the same thing with a DTS package that uses an ActiveX script to log into each of our 41 servers and query msdb. The results are written out to our web server so I just need to look at the web page each morning. No linked servers necessary.




Post #41625
Posted Thursday, September 19, 2002 8:19 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, June 6, 2014 2:06 PM
Points: 1,040, Visits: 277
Looks like lots of good methods to accomplish the samething.

Betsy - I would like the script that uses the linked servers.

Gregory Larsen, DBA

If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples


Gregory A. Larsen, MVP

Need SQL Server Examples check out my website at http://www.sqlserverexamples.com
Post #41626
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse