|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Tuesday, August 14, 2007 1:40 PM
Points: 42,
Visits: 1
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, March 04, 2010 4:20 PM
Points: 186,
Visits: 63
|
|
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.
I made following changes: 1. declare @daydiff int select @daydiff = 1 'in case I am only interested in last night job 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 <> '(Job outcome)' 2. I filtered out the step_name = '(Job outcome)' 3. I union all servers 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. thanks -D
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, March 04, 2010 4:20 PM
Points: 186,
Visits: 63
|
|
One thing: why the name of sj and sh data type are sysname? which causes centain problems in datalength() function... -D
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, September 14, 2009 10:26 AM
Points: 1,
Visits: 8
|
|
Have you updated this routine to work on SQL Server 2005?
|
|
|
|