﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by Randy Dyess / Article Discussions / Article Discussions by Author  / Managing Jobs Using TSQL / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 18 May 2013 21:45:40 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Managing Jobs Using TSQL</title><link>http://www.sqlservercentral.com/Forums/Topic10789-84-1.aspx</link><description>Have you updated this routine to work on SQL Server 2005?</description><pubDate>Mon, 14 Sep 2009 10:10:56 GMT</pubDate><dc:creator>thepunisher9</dc:creator></item><item><title>RE: Managing Jobs Using TSQL</title><link>http://www.sqlservercentral.com/Forums/Topic10789-84-1.aspx</link><description>&lt;P&gt;One thing:&lt;/P&gt;&lt;P&gt;why the name of sj and sh data type are sysname? which causes centain problems in datalength() function...&lt;/P&gt;&lt;P&gt;-D&lt;/P&gt;</description><pubDate>Tue, 06 Apr 2004 17:10:00 GMT</pubDate><dc:creator>David Lu</dc:creator></item><item><title>RE: Managing Jobs Using TSQL</title><link>http://www.sqlservercentral.com/Forums/Topic10789-84-1.aspx</link><description>&lt;P&gt;&lt;img src='images/emotions/smile.gif' height='20' width='20' border='0' title='Smile' align='absmiddle'&gt;Excellent. I have the similar situation of handling about 80 above servers. You script of join sj and sh solve most of my delima of checking server by server and consolidate all into one table.&lt;/P&gt;&lt;P&gt;I made following changes:&lt;/P&gt;&lt;P&gt;1. declare @daydiff int           select @daydiff = 1 'in case I am only interested in last night job &lt;/P&gt;&lt;P&gt; where cast(left(cast(run_date      as char(8)), 4)    as int)= datepart(yyyy, getdate())   and cast(substring(cast(run_date as char(8)), 5, 2) as int)= datepart(month,getdate())   and cast(right(cast(run_date     as char(8)), 2)    as int)= datepart(day,  getdate()-@dayDiff)   and sh.step_name &amp;lt;&amp;gt; '(Job outcome)'&lt;/P&gt;&lt;P&gt;2. I filtered out the step_name = '(Job outcome)'&lt;/P&gt;&lt;P&gt;3. I union all servers&lt;/P&gt;&lt;P&gt;4. Finally, I create 2 cursor loops to find any existing databases on 80 servers either missing the job set up or with failure status. It works great in either case.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;-D&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Tue, 06 Apr 2004 17:07:00 GMT</pubDate><dc:creator>David Lu</dc:creator></item><item><title>Managing Jobs Using TSQL</title><link>http://www.sqlservercentral.com/Forums/Topic10789-84-1.aspx</link><description>Comments posted to this topic are about the content posted at &lt;A HREF=http://www.sqlservercentral.com/columnists/RDyess/managingjobsusingtsql.asp&gt;http://www.sqlservercentral.com/columnists/RDyess/managingjobsusingtsql.asp&lt;/A&gt;</description><pubDate>Fri, 21 Mar 2003 00:00:00 GMT</pubDate><dc:creator>Randy_Dyess</dc:creator></item></channel></rss>