|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, May 27, 2009 5:17 AM
Points: 142,
Visits: 18
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Tuesday, November 17, 2009 8:14 PM
Points: 2,641,
Visits: 510
|
|
Nice procedure. However, I'd use some sort of flagging instead of a GOTO loop. If you combine the SET assignment with a query, you can return the status with extra variables. eg: WHILE @myFlag = 0 BEGIN -- check if job has completed SET @jobresult= ISNULL(SELECT b.last_run_outcome from msdb.dbo.sysjobservers b (nolock) where b.job_id=@Jobid and convert(varchar(12),last_run_date,121)>=@lastrundate and last_run_time>=@lastruntime), -1) IF @jobresult <> -1 SET @myFlag = 1
END Also, under what security context does this procedure get called, and how does that affect running the jobs?
Hope this helps Phill Carter -------------------- Colt 45 - the original point and click interface 
Australian SQL Server User Groups - My profile Phills Philosophies Murrumbeena Cricket Club
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, October 17, 2006 11:48 PM
Points: 1,
Visits: 1
|
|
The dammed thing is that the great SQL Server scheduler is not available in MSDE SQL 2005 (aka SQL Express). regards Baudewijn Vermeire
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, August 06, 2009 8:11 AM
Points: 2,
Visits: 7
|
|
What is Control-M? I apologize, I'm still supporting SQL7 and 2000, so please be kind.
Don
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, May 27, 2009 5:17 AM
Points: 142,
Visits: 18
|
|
Control-M batch scheduler is a enterprise batch management solution that is used to run and mantain external jobs . This is a product developed by BMC Software .
Kindest Regards,
Sureshkumar Ramakrishnan
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: 2 days ago @ 12:37 PM
Points: 929,
Visits: 304
|
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Friday, April 24, 2009 6:34 PM
Points: 93,
Visits: 36
|
|
Sureshkumar, I'm curious why you did not include SQL's native Multi-Server administration system that allows you to schedule, monitor, and report on jobs from a centralized server (MSX the Master) of other SQL servers (TSX Targets). Thanks...Nali
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, May 29, 2009 10:42 PM
Points: 4,
Visits: 26
|
|
Hi Suresh,
A nice procedure.
Can it handle the various steps present inside the job. What if we need to pass the return status of the various steps in a job to Control M. How I can get the return value of each step for a job? Any ideas???
Kind Regards
Sameer
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Tuesday, November 17, 2009 8:14 PM
Points: 2,641,
Visits: 510
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, May 22, 2009 5:59 AM
Points: 1,
Visits: 2
|
|
Hi, I'm a Control-M administrator & know very, very little SQL. How does one use this procedure in Control-M, we currently running a batch file, i.e.:- "dtsrun /S omrsql064 /U xxx /P xxx /n CLASs_IMPORT Group Schemes Lead Data /e /w true" Will apprecaite any assistance. Regards,
 Eb
|
|
|
|