3

To export some data to a text file, I used the wizard in SSMS 17.x to create an SSIS file, and it ran fine from the wizard, but it gives me an error when I try to execute it again using xp_cmdshell, like this:

EXEC xp_cmdshell 'DTExec /f "\\MyServer\MyScriptFolder\MyExportPackage.dtsx"'

The error reads:

Description: The version of Destination - MyExportPackage_txt is not compatible with this version of the DataFlow.

What the heck does that mean? I've Googled this and the only thing I see is people mentioning 32-bit vs 64-bit versions of dtexec.exe, but I don't see what that would have to do with anything, or how to fix that.

Shakeer Mirza
  • 5,054
  • 2
  • 18
  • 41
Brian Battles
  • 971
  • 1
  • 7
  • 19
  • 2
    Why are you trying to run a package with xp_cmdshell? There are SSIS catalog procs for that. or, you can run with SQL Server Agent – user1443098 Sep 28 '18 at 14:27
  • I completely agree with @user1443098 , you'd be far better off deploying your packages to SSISDB and then executing them from there, or using SQL Server Agent to schedule them. On a different note, the 64bit/32bit idea is unlikely here. The most common time that's an issue is when using the (awful) ACE drivers, however, you're exporting to a text file here. – Thom A Sep 28 '18 at 14:30
  • The error complains that the package isn't compatible with the server. Which version are you using? You can install SSDT to open the package, check what version it targets and change it – Panagiotis Kanavos Sep 28 '18 at 14:38
  • All I need to do is execute this process from time to time on a more or less ad hoc basis. One quick way I sometimes run it is using an MS Access frontend application, where I can put that line (above) in a simple pass-through query in an Access application and just run the query, and thus, the DTSX package, from there. It works fine for some other DTSX files I use to import data from text files. It just doesn't work for this, which is an export to ext file routine. Can you point me to docs or samples of how to use SSISDB or SQL Server Agent to do the same? – Brian Battles Sep 28 '18 at 14:40
  • Panagiotis, the server is 2014. Can you provide a link to show me how to install and use SSDT? – Brian Battles Sep 28 '18 at 14:42
  • https://learn.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017#ssdt-for-vs-2017-standalone-installer – Panagiotis Kanavos Sep 28 '18 at 14:44
  • I've seen that, but it looks like it only works with Visual Studio and we don't use that in our shop, just MS Access/VBA and SSMS. – Brian Battles Sep 28 '18 at 17:58
  • If you want to do anything with packages except run them, you need SSDT. To just run them, I'd put them in SSISDB and run them ad hoc from there or schedule with Agent. Also VS COmmunity is free and supports SSDT tools – user1443098 Sep 28 '18 at 18:15

0 Answers0