executing a windows batch file(.bat) from sql server job

  • My batch file basically copies the txt files from Unix server to Windows directory.

    i use some credentials inside Txt file to connect to the Unix server and copy the files.

    When i run as windows batch file from cmd prompt or task scheduler job it executes without any issues, but when i set up the batch job to run from SQL server- job does not run.

    Can anyone know whats the reason or solution. Please help.

  • Are there error messages when the job fails?

  • When run from SQL Server, the batch file executes under the credentials of the service account under which the SQL Server runs, not your id. Make sure that the service account has permissions to execute the batch file and permissions to the directories where the files you are manipulating live.


    And then again, I might be wrong ...
    David Webb

  • I need to also call a windows scheduler job from SQL server, can anyone tell me how to invoke windows task scheduler job.

  • Hi David, thanks for the info...

    But the sql service is running under my domain account and i am the local admin too on the box.

    Can i know is there any other way of calling/running a windows batch file using powershell script?.

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

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