sqlbatch-filessissql-server-expressdtexec

Executing SSIS Package from DTExec batch file


I have an SSIS package which contains a Script Task, Execute SQL Task and File System Task inside of a Foreach Loop container.

I can execute the package without issue in Visual Studio, but when I try executing the file through a batch file, I get the following error log :

Microsoft (R) SQL Server Execute Package Utility
Version 16.0.1000.6 for 64-bit
Copyright (C) 2022 Microsoft. All rights reserved.

Started:  3:06:00 PM
Error: 2024-05-10 15:06:00.31
   Code: 0xC001F02A
   Source: Foreach Loop Container 
   Description: Cannot create a task from XML for task "Script Task", type "Microsoft.ScriptTask" due to error 0x80070057 "The parameter is incorrect.".
End Error
Error: 2024-05-10 15:06:00.31
   Code: 0xC0010018
   Source: Script Task 
   Description: Failed to load task "Script Task", type "". The contact information for this task is "".
End Error
Error: 2024-05-10 15:06:00.32
   Code: 0xC0010026
   Source: Script Task 
   Description: The task has failed to load. The contact information for this task is "".
End Error
Error: 2024-05-10 15:06:00.32
   Code: 0xC0024107
   Source: Script Task 
   Description: There were errors during task validation.
End Error
Error: 2024-05-10 15:06:00.32
   Code: 0xC0010025
   Source: Package 
   Description: The package cannot execute because it contains tasks that failed to load.
End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started:  3:06:00 PM
Finished: 3:06:00 PM
Elapsed:  0.282 seconds

I am using SQL Express 2016

My batch file code is as follows :

"C:\Program Files\Microsoft SQL Server\160\DTS\Binn\DTExec.exe" /F "C:\Users\orsal\OneDrive\Desktop\App\Software\ETL\Inbound\SSIS Packages\LoadOdds\Integration Services Project1\Package.dtsx" > log.txt

Help is greatly appreciated!

I was unsuccessful googling similar issues.

EDIT: I have removed the script task and file tasks and now it works. Any idea why the script task and file task may be causing issues?


Solution

  • I have downloaded SQL Server Standard Edition to replace the Express Version. I have also downloaded Integration Services with the new SQL Server Standard Edition.

    I can now execute my SSIS package fine from batch file.

    I believe my issue was that I did not have Integration Services installed or the Integration Services on SQL Server Express Version has limited features.