SSIS Run through a batch file using DTExec.exe - batch-file

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 "
" but I was failed. What could be the reason?
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"
Targets SQL Server 2017

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

Related

Cannot run SQLServer2005_DTS.msi on Windows 10

I am hoping that I can get some assistance with an error that I'm getting when trying to install the SQLServer2005_DTS.msi on Windows 10.
The error that I'm getting is:
'Module C:\Program Files\Microsoft SQL Server\80\Tools\Binn\dtsui.dll failed to register. HRESULT -2147024714. 'Contact your support personnel.'
I got the msi from
"Feature Pack for Microsoft SQL Server 2005 - February 2007" at https://www.microsoft.com/en-us/download/details.aspx?id=24793
It seems that the msi tries to to register the 4 dll's below but fails:
dtsui.dll
ctasksui.dll
cdwtskui.dll
sqlns.dll
I have also tried to manually register the dll's without any luck as follows:
Open a command prompt as admin
Change the directory to the Binn folder where the dll is located from the command prompt type cd C:\Program Files\Microsoft SQL Server\80\Tools\Binn
Register the dll, from the command prompt type: regsvr32 dtsui.dll
All I get is a return to the command prompt where I was expecting a dialog box.
SQL Server 2005 and some components are not compatible with Windows 10
https://technet.microsoft.com/en-us/library/ms143506(v=sql.90).aspx
What you can do it deploys a VM to use.
Its compatibility problem.Because its support till windows Vista.
Try to install in compatibility mode from properties option from run as administrator,

Error Running SSIS Package from Command Line

Ultimately, I'm trying to schedule SSIS packages to run on a regular basis using Task Scheduler in an Azure VM (Windows Server 2016 Datacenter). From the command line on my development machine (Windows 10), I'm able to run...
dtexec.exe /Project "pathToMy.ispac" /Package "pathToMy.dtsx"
...and it works as expected. However, when I try to do the same from the Azure VM I get the following error:
Microsoft (R) SQL Server Execute Package Utility Version 11.0.6020.0
for 32-bit Copyright (C) Microsoft Corporation. All rights reserved.
Started: 2:17:46 PM Could not load package
"MyPackage.dtsx" because of error 0x80131500.
Description: The package failed to load due to error 0xC0011008 "Error
loading from XML. No further detailed error information can be
specified for this problem because no Events object was passed where
detailed error information can be stored.". This occurs when
CPackage::LoadFromXML fails. Source: MyPackage
Started: 2:17:46 PM Finished: 2:17:47 PM Elapsed: 0.547 seconds
On both machines, I have the same version of SQL Server 2016 Developer (w/ SSIS) and Visual Studio 2015 installed. Also, I'm able to run the package fine on the VM from within Visual Studio. It's only from dtexec.exe that I have issues.
I've tried every solution on here from other posts getting similar errors and none have helped. Any ideas?
Thanks,
Ian
Thanks to #Nick.McDermaid, the answer to this riddle has been found. By running dtexec.exe (with no parameters) on the dev machine and on the VM, I was able to see that the VM version was v11 and the dev version was v13 which explained why I was getting the error and why one worked and another didn't.
I then did a File Explorer search on the VM for dtexec.exe copies and found several. Apparently, the environment path was set to find the older version. I probably could have found the variable causing this problem and changed it. However, out of concern about breaking something else and wanting a quick solution, I chose to execute using the full path to the correct version. For v13, this ended up being...
"C:\Program Files\Microsoft SQL Server\130\DTS\Binn\dtexec.exe"
So, for my schedule task I set the following properties for my "Start a program" action.
Program/Script: "C:\Program Files\Microsoft SQL Server\130\DTS\Binn\dtexec.exe"
Add Arguments: /Project "bin/Development/myProject.ispac" /Package "myPackage.dtsx"
Start in: c:{path to my .dtsx file}

SSIS Script Task not working when called through dtexec

I am Currently using the visual studio 2015 in which my script task runs fine. When i tried to run the same package using DTEXEC util using the command
C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\DTExec.exe" /f "filepath"
I am getting an error
The Script Task "ST_7432393ecf7a4af3906ba19425aeb245" uses version 14.0 script that is not supported in this release of Integration Services. To run the package, use the Script Task to create a new VSTA script. In most cases, scripts are converted automatically to use a supported version, when you open a SQL Server Integration Services package in %SQL_PRODUCT_SHORT_NAME% Integration Services. at Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptTask.LoadFromXML(XmlElement elemProj, IDTSInfoEvents events) "
Note :
My SSDT Version is 14.061021.0
Sql server version 2016
Visual studio version 2015
"C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\DTExec.exe"
/f "filepath"
The 120 refers to SQL Server 2014 while script version 14.0 is meant for SQL Server 2016.
Your SSIS is probably build with the wrong TargetServerVersion. Check the properties of your project and change it to the correct version.
EDIT: Or if you're using SQL Server 2016 then you need to change the path to the correct version DTExec.exe. If you installed it in the default path then changing 120 to 130 should work.

Upgraded SSIS package fails to run, "must install Standard Edition of Integration Services"

I was forced to upgrade my SSIS packages using VS2015 + SSDT, however I'm unable to get the compiled dtsx files to run now through command line using 130\DTS\Binn\DTExec.exe
Full error:
Source: Process file data flow SSIS.Pipeline
Description: To run a SSIS package outside of SQL Server Data Tools you must install Standard Edition of Integration Services or higher.
I've reinstalled MSSQL2014 w/ integration services and I see SQL Server Integration Services 12 is running.
DTExec.exe gets installed when you pick the "Integration Services" option off the setup CD. Make sure that it's installed in the directory indicated in the command line. You also need to make sure that the versions match between the SSIS package and DTEXec.exe. "..\120\DTS\Binn\DTExec.exe" is used for MSSQL2014.
I received this error from double-clicking a DTSX file which opened the Execute Package Utility from C:\Program Files\Microsoft SQL Server\140. I couldn't get it to work until I:
Saved off the command line from the "Command-line" tab of the utility
Navigated to C:\Program Files\Microsoft SQL Server\130\DTS\Binn
Called dtexec.exe with the command line
I think the Execute Package Utility was somehow looking for SQL Server 17 while I only had SQL 16 installed. DTExec.exe was able to find SQL 16 ok.

SSIS error loading package in VS 2012 with TFS

I am receiving the following error when trying to execute an SSIS package using Visual Studio 2012:
Error 39 Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: The
package failed to load due to error 0xC0011008 "Error loading from
XML. No further detailed error information can be specified for this
problem because no Events object was passed where detailed error
information can be stored.". This occurs when CPackage::LoadFromXML
fails. ---> System.Runtime.InteropServices.COMException: The package
failed to load due to error 0xC0011008 "Error loading from XML. No
further detailed error information can be specified for this problem
because no Events object was passed where detailed error information
can be stored.". This occurs when CPackage::LoadFromXML fails.
at
Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSPackagePersist100.LoadPackageFromXML(Object
vSource, Boolean vbSourceIsLocation, IDTSEvents100 pEvents) at
Microsoft.SqlServer.Dts.Runtime.Package.LoadFromXML(String packageXml,
IDTSEvents events) --- End of inner exception stack trace ---
at Microsoft.SqlServer.Dts.Runtime.Package.LoadFromXML(String
packageXml, IDTSEvents events) at
Microsoft.SqlServer.Dts.Runtime.Project.LoadPackage(IProjectStorage
storage, Package package, String streamName, IDTSEvents events) at
Microsoft.SqlServer.Dts.Runtime.PackageItem.Load(IDTSEvents events)
at Microsoft.SqlServer.Dts.Runtime.PackageItem.get_Package() at
Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.IncrementalBuildThroughObj(IOutputWindow
outputWindow) at
Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.BuildIncremental(IOutputWindow
outputWindow)
0 0
The package is stored in TFS and I can open the package/solution without any errors. I just get the error when i try to excecute the package or any step in the package.
I created a new package on my machine (64 bit) and it worked fine. I'm just having trouble running the package when opening from TFS.
thanks
Scott
I resolved a very similar situation by changing the SQL Server sdk version that my solution was pointing.
I had SQL Server Express 2008 installed, and was using VS 2012 with BI Tools 2012. So, my solution was referencing the assembly Microsoft.SqlServer.ManagedDTS.dll version 10. For my case, the correct was the version 12.
I had this problem when trying to open an SSIS package which used a component which I did not have installed. In my case, it was the "Azure Feature Pack".
I had similar errors on a Win64, VS2013, SQL2012 system. The SSIS package did not load correctly.
Identify: I created a local copy of the whole package, and narrowed the problem with reduction to a single sub-package.
Reason: different date format.
Solution: I had to change the Windows date format to UK (source of the package), and since then everything is fine.
You have to copy the reference libraries to the Program Files directly as well.
I saw that in the (x86) path, the files were there, but not in the 64-bit folder of Program Files. I'm using Visual Studio 2010.
1 - C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Connections
2 - C:\Program Files\Microsoft SQL Server\110\DTS\Connections
The referenced DLL was found in location 1, but not in 2.
I closed Visual Studio, copied the DLL over to path 2, and opened VS again. The package just worked like normal.
I resolved a very similar situation by changing the TargetServerVersion in the project general configuration properties. I use Visual Studio 2015. By default SQL Server vNext was selected, whereas I have SQL Server 2012 installed.

Resources