0

I have an SSIS package that needs to run by a batch file. When I execute the SSIS package through SSDT it's working fine. But When I execute through "DTExec.exe" it's throwing below error message. I tried the deferent location of " DTExec.exe" but I was failed. What could be the reason?

My Batch File Command, Folder Structure, Log File, SSIS Package

In SSDT Package Runs Successfully

SSDT Version - 2017

After switching to the 64bit dtexec located in the 140 directory, I have an error indicating it cannot create a task from XML for task "Script Task"

enter image description here

Targets SQL Server 2017

enter image description here

billinkc
  • 59,250
  • 9
  • 102
  • 159
Gihan Kumara
  • 7
  • 1
  • 6

1 Answers1

0

The dtexec you'll find under IDE\CommonExtensions\Microsoft\SSIS\XXX\Binn\ where XXX is your version number is not for "regular" use. Those are for use with the Visual Studio/SSMS installation.

Instead, you're likely going to want one that is located in

C:\Program Files\Microsoft SQL Server\140\DTS\Binn\DTExec.exe

or

C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\DTExec.exe

depending on your 32 vs 64 bit requirements as well as the version of SQL Server you have installed (and have targeted your packages)

Your screenshot shows 150 but I don't see a 150 version of the dtexec installed on your machine but that could just be my eyes

billinkc
  • 59,250
  • 9
  • 102
  • 159
  • Sir. Tried on your recommendation. I'm getting below error message now (C:\Program Files\Microsoft SQL Server\140\DTS\Binn\DTExec.exe) http://prntscr.com/sz332p – Gihan Kumara Jun 13 '20 at 15:46
  • [140 is SQL Server 2017](https://stackoverflow.com/questions/18753886/sql-server-file-names-vs-versions) Is that the version you built your packages in? Right click on Project and under the Configuration menu, it ought to indicate what version it targets - typically the newest version so likely 2019 – billinkc Jun 13 '20 at 15:57
  • Yes sir. I have SQL Server 2017 and my SSDT Target version also Same. http://prntscr.com/sz3h7f But same error my batch file throwing – Gihan Kumara Jun 13 '20 at 16:16
  • The "Cannot create a task from XML" is a different class of errors from your original "Could not create DTS.Application" At this point, I'd right click and disable the Script Task and try running the package to identify - is the package itself fundamentally broken or is there something specific to the Script Task causing the exception. – billinkc Jun 13 '20 at 16:29
  • Sir, Here what I'm getting when I run the batch file while Script task disabled http://prntscr.com/sz3rem – Gihan Kumara Jun 13 '20 at 16:37
  • Sir, Could you help me – Gihan Kumara Jun 16 '20 at 03:07