Running BAT Files In DTS

  • I have a DTS job I created that uses the "Execute Process Task" to run a BAT file which deletes all text files from a specific directory.

    The job works fine if I run it directly in the DTS window; but if I schedule it, it fails, giving the following as an error message:

    " DTSRun OnStart: DTSStep_DTSCreateProcessTask_1 DTSRun OnError: DTSStep_DTSCreateProcessTask_1, Error = -2147024893 (80070003) Error string: The system cannot find the path specified. "

    I know it's not a permissions issue, as I have full rights and all of my other scheduled jobs work- the only ones that fail are the ones that call BAT files; and then only when scheduled.

    Interestingly, when I open the job to look at the steps in the SQL Server Agent\Jobs window, the task is listed as a CmdExec statement, which is:

    "DTSRun //~Z0xEFF7BE5C575ABB68B65DFE698450B6A9C186FA389E2B372DBF122E7F2B87F6DD8729F46B00737819A92A58007626823FF6366CA002C545B7934D5CD21E8305B2AF8601280592E908D9E36457E9276FC3379A892F78768579A2349A3D7838BEC298BB0B9C40C94BCFF474468DEDA6DDD794CE91B82B179D3DAD32574D88D14EAC712591".

    I don't know what that means exactly; but it results in failure every time. Help please!

  • Check the permissions on the folder which contains the files you are deleting. Make sure the account that the job is running under has authority to access and modify the folder contents. The permissions you most likely want to check are those for the account under which the SQLCmdAgent service is running under. This link might help:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dtssql/dts_pkgmng_6asl.asp (watch for the wrap on that)

    hth,

    Michael

    Michael Weiss


    Michael Weiss

  • The error message seems to be that the spacified drive not found or the account which you are using to run Jobs does't have the required permission to access this drive.

    When you try to run DTS locally, DTS try to access the directory you spacified locally.

    Try to run the DTS directly in server. When that successfull the job will also run well.

    Regards

    Joseph

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

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