|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, November 23, 2010 2:55 AM
Points: 142,
Visits: 37
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 5:53 AM
Points: 2,692,
Visits: 1,074
|
|
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: Monday, May 24, 2010 3:12 PM
Points: 2,
Visits: 9
|
|
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: Tuesday, November 23, 2010 2:55 AM
Points: 142,
Visits: 37
|
|
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
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Sunday, May 19, 2013 8:09 AM
Points: 1,558,
Visits: 1,396
|
|
Windows built-in Task Scheduler works great for scheduling and running DTS packages via the DTSRun utility. It even allows you to specify the Windows account to run it under. This comes in especially handy because it allows me to use external executables without installing them on the SQL Server.
My blog: SQL Soldier Twitter: @SQLSoldier Microsoft Certified Master: SQL Server 2008 Sr. Product Consultant and Chief SQL Server Evangelist @ Idera My book: Pro SQL Server 2008 Mirroring
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Friday, April 05, 2013 4:27 AM
Points: 95,
Visits: 47
|
|
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: Wednesday, May 08, 2013 6:24 AM
Points: 8,
Visits: 62
|
|
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: Friday, May 17, 2013 5:53 AM
Points: 2,692,
Visits: 1,074
|
|
|
|
|
|
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
|
|
|
|