I need to execute an batch file through SSIS job. previously we used to do this in cmd prompt, is there any way that we can run batch file through ssis job
Solution: To execute batch file from SQL Server Integration Services Package, we will be using Execute Process Task from Control Flow Items. Locate the path for your Executable, In my case the CMD.exe is present on C:\Windows\System32\cmd.exe.
Use the Process page of the Execute Process Task Editor dialog box to configure the options that execute the process. These options include the executable to run, its location, command prompt arguments, and the variables that provide input and capture output.
Use an Execute Process Task
in your Control Flow to do this.
Execute Process Task
from the Toolbox (if the Toolbox is not open, open it with Menu
-> View
-> Toolbox
) to the Control FlowRightMouseButton on the Task
-> Edit...
-> Process
-> Executable
For further instructions on SSIS go to e.g. Microsoft
First of all, consider if you really need to execute a batch file. Maybe there is a built in way to achieve what you need. For example if you are just moving/renaming files then you can use the FileSystemTask
Otherwise, you can use the ExecuteProcessTask
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With