SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Managing Jobs Part 3


Managing Jobs Part 3

Author
Message
Andy Warren
Andy Warren
SSC-Forever
SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)

Group: Moderators
Points: 40596 Visits: 2770
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/awarren/managingjobspart3.asp>http://www.sqlservercentral.com/columnists/awarren/managingjobspart3.asp

Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
Tatsu
Tatsu
SSCrazy
SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)SSCrazy (2.8K reputation)

Group: General Forum Members
Points: 2822 Visits: 307
In the article you stated "you'll have to store your code in a file and execute it as an OS task using wscript.exe" but what you really want to use is cscript.exe. This way, all your WScript.Echo calls get sent to the standard output and if you're saving the job step output to a log file, this will get sent to your log file. Unfortunately, if you're using wscript.exe, the Echo tries to pop up a message box which everyone knows is a bad idea on a production system!

Thanks for this series on jobs, it has given me a lot to think about as I have six servers to manage and each one has 30+ databases and lots of jobs to go with them!


Bryant E. Byrd, MCDBA
SQL Server DBA/Systems Engineer
Intellithought, Inc.
bbyrd@intellithought.com

Bryant E. Byrd, BSSE MCDBA MCAD
Business Intelligence Administrator
MSBI Administration Blog
Andy Warren
Andy Warren
SSC-Forever
SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)SSC-Forever (40K reputation)

Group: Moderators
Points: 40596 Visits: 2770
Didnt know that, great tip! Typically I write my code in VB, then port to VBS, so I never have echoes anyway. Glad it's helped. I've got at least one more to go where I'll talk about using exe's to package jobs.

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

Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
LeeFAR
LeeFAR
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1779 Visits: 342

Thanks for the series Andy. I do have two questions though. We are dealing with getting our DTS jobs under control. Two things have surfaced just recently. The first one is scheduling. We have a lot of requirements for jobs that must run on odd-ball times. For example, the last working day of the month, sixth to the last working day of the month, first working day of the month, etc. Up to this point, we have had to programmatically handle this with a VBScript task in our DTS package. It looks to a table and sees if the current date is in this table. If so, then continue with package, otherwise stop running.

Management says this is good enough and is looking elsewhere for a scheduler like there is on the mainframe (yuck). Do you have any suggestions?

Second question, has to do with DTS packages in general. We have noticed that some of our packages show as a failed job, however we know that the package ran successful based on the outcome. I haven't had time to investigate this, but my guess is that there is a VBScript task that is returning a controlled failure and for whatever reason DTS/Scheduler is picking this up and reporting the whole package as failed. Have you seen this before? If this is the case, then it would seem to me that you should be able to change the packages execution status.

Thanks and look forward to your upcoming topics.





Paul McCurdy
Paul McCurdy
SSC-Addicted
SSC-Addicted (499 reputation)SSC-Addicted (499 reputation)SSC-Addicted (499 reputation)SSC-Addicted (499 reputation)SSC-Addicted (499 reputation)SSC-Addicted (499 reputation)SSC-Addicted (499 reputation)SSC-Addicted (499 reputation)

Group: General Forum Members
Points: 499 Visits: 225
Interesting article - as it confirms my thoughts on the use of SQLAgent! Looking forward to the next installment



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search