DTS Fails reports failure when scheduled, but does what it is supposed to do

  • I have a DTS package that runs a VBscript that uses DMO to script out all our non system stored procedures to a text file. It runs fine in the DTS package, but when I schedule it, it reports that it fails even though it does write the text file properly, so I don't think it is permissions related to sql server agent account.

  • Adam,

    Set the DTS logging, the next time you run it, you can find where is failing. That happened to me with one DTS and after the logging was set I was able to pinpoint where the failure was. Good luck

  • Well, I only have one step, and it does the vbscript. there is only one line after it writes the file (the file does get written, so that line executes fine I think)

    so it tries to write the file, and the file is there and seems correct. then it does this line:

    Main = DTSTaskExecResult_Success

     

    for some reason it errors out - if you run the package manually, it doesn't fail, it works fine.

  • OK this is a new one - I was using dmo to grab all my table objects, loop though them appending the script for each one to a variable. then I write out the variable to a text file. This took about 6 1/2 minutes. I changed it to append directly to the file instead of building the string in a variable and it fixed the problem - it also runs in under a minute - I am assuming this is because of the variant types of variable you must use in vbscript.

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

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