• You can use a command line to run a DTS package. The best way that I have found to run a DTS package on an as needed basis is to create a job to run it (i.e. right click on the package, schedule) and then leave the job disabled so that the job does not run by itself.

    Once you have that you can use the sp_start_job to run the job / package. I like this option better because you can then see the job name in the code that you are running rather than using the DTS run command (DTSRun /~S 0x18CF91F7708E09CACB27369D2FE049EC42FFBAEF8638C22E /~N 0x953DECD59905CCB02A4C1CD359F1D4C944771396F05B5F9C995BB911520F93E5E41D0D3B5F456E78F54BAC65F60AF4DC5CB698DC5591A553 /E).

    I realize you could comment your code but, isn’t sp_start_job ‘DBName_ChangeTable1OwnerToDBO’ nicer?

    Just my thoughts and hope this helps.

    David

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot