Scheduling latest version of Pkg?

  • Hello,

    I've created a package.  I ran it in designer.  Ran great.  The supervisor comes by and asks me to add some changes.  I did.  I then right clicked on the package and scheduled it.  I saw that in the job history that there was a problem.  I ran the package again in the designer and sure enough there was a problem.  I corrected the problem and ran it again in the designer.  Ran great.

    But the scheduled job keeps failing.  When I looked the job history again, it has the same error message as before.  I don't think it is running the latest version of the package.  It is running the version that had a problem.

    How do you update the job when you update the package?  If I make a change to the package, how do I insure that the scheduled job will run the latest and greatest version of the package.  I've dealt with the security issue of scheduling jobs vs. the designer.  I just don't think it is running the lastest version?

    Any help would be appreciated!

    Tony

     

    Things will work out.  Get back up, change some parameters and recode.

  • If you right-clicked on the package to schedule it, the DTSRUN command in your job contains version information.  The DTSRUN command will start out as "DTSRun /~Z" with a bunch of random characters.

    There are 2 things you can do to ensure that the latest version of the package is executed by the SQL job:

    1)  Delete the job everytime you update the package.  Right-click on the package to schedule.

    OR

    2)  Change the DTSRun command so it doesn't specify version.  Something like this will do the trick:

    DTSRUN /S (local) /N "Name of DTS package" /E

    Look up "dtsrun utility" in books online for more information on the command line switches.

  • FYI : the "bunch of random characters" are not really random. They are in fact an encrypted equivalent of the parameters required to run a particular version of the package.

    DTSRUN has this encryption facility so that you can include sensitive information on the command line (e.g. passwords).

    The downside of this is that you cannot easily work out what a particular command actually is doing (no doubt there is a decryption tool out there somewhere).

  • A quick way of generating the dtsrun command is using DTSRUNUI.

    1.Run DTSRUNUI from cmd prompt.

    2.Connect to the server where the package resides

    3.Select the package from the server (not the version underneath it)

    4.Choose Advanced option

    5.Generate.  This gives the full command string + encryption option.

  • Thanks everyone!  That was a real help!

     

    Tony

    Things will work out.  Get back up, change some parameters and recode.

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

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