Weird Schedule Behavior

  • OK, this is weird I have a DTS package that has some vbscripts that change information in an xml file.  The dts works great, so now I have it scheduled.  The problem is that all of the code in the DTS's vbscripts work except the xml part which is first (even though it runs fine manually).  I have no error handling so if the xml code fails it should cause the job to fail but it doesn't.  The process of the vbscript code (all in one ActiveX object) is like so: alter xml, send e-mail, update sql table.  It always succeeds in sending the e-mail and updating the sql table even though an error should occur before the e-mail and sql table if the xml fails.  The weirdest part is that if I run the sceduled job manually or execute the package manually the code works perfect, even if it is processing the same order it just unsuccessfully processed while running automatically.  Is there a way that a job can cause a DTS not to execute some of its code?  I know this is weird, but I need some help.

    Thanks,

    Adam

  • I would make sure that the RunAS for the SQL job has rights to perform the activities involved.  When you run the package it uses YOUR rights...  May be permission problem...



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • OK, it has gotten even weirder.  I checked the DTS is running under an admin account, and so is the job.  I even tried deleting the job, then using a windows scheduled task (under an admin account) using the DTSRUN command, and it did the exact same thing.  I can run the DTS manually and it will work perfect, but automatically it doesn't alter the XML.  I tried logging the results to a text file, and the file just said that all steps succeeded even though the didn't do everything they were supposed to.  I have no clue what to do.  **NOTE: The vbscript does not contain any "On Error Resume Next" commands either.

    Thanks,

    Adam

  • Do you have, the SQL server related to this problem , on your machine or any other machine?

    If the SQL server is on another machine when you run it Manually using enterprise manager it will look for the xml path locally (in your machine) when you run it as a job on the server it will look for the path on the server.

    if that's the problem use a shared folder to locate the XML file then it will work same from your machine as well as from the server.

     

  • I believe that I found the issue.  There is another DTS on another server that utilizes the same file at the same time.  I now have a job that runs one DTS in the first step, then runs the other DTS in the next step, and for now it seems to have corrected the issue.  Thank you for the assistance with this.  If it shows up again I will post again.

    Adam

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply