Error Running SSIS Package from Command Line - sql-server

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}

Related

Unable to install SQL Server (setup.exe)

I used SQL Server 2019 express version on my laptop butI uninstalled. Now I am trying to install SQL Server 2019 Developer edition but I get an error:
Exit code (Decimal): -2068119551 Exit message: Cannot find registry key 'SOFTWARE\Microsoft\Microsoft SQL Server\150\ConfigurationState'.
Error description: Invalid command line argument. Consult the windows installer SDK for detailed command line help.
Environment: Dell/Inspiron/Windows 10 Home/16gb ram/256 SSD / 1TB HDD /Corei7
Can anyone help me how to solve the problem? Thanks
PS: attaching screenshot for kind reference
You can try below options, based on the reference article
Run the setup.exe again, repair the installation.
Run the Setup.exe as administrator
See whether you have clearly uninstalled the previous SQL Server setup and try again.
Did you modify the registry setting earlier. If so, please revert the changes and try the installation. Eg., changing the default installation to D:, instead of C: etc.
I fed up the below problem
Unable to install SQL Server (setup.exe).
Exit code (Decimal): -2068119551 Exit message: Cannot find registry key 'SOFTWARE\Microsoft\Microsoft SQL Server\150\ConfigurationState'. Error description: The specified service does not exist as an installed service.
I fixed the above problem
DR-2033 avatar image
Click to vote
1 Vote"
1
DR-2033 answered • Dec 21 2021 at 4:03 AM | EricK-0825 commented • Mar 21 2022 at 3:20 AM
Unable to install SQL Server (setup.exe)

SSIS Run through a batch file using DTExec.exe

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

VS 2015 MSBuild Deploy Database Project Error

I'm having an issue using VS 2015 MSBuild to deploy a database project via the command line. The issue is I need to be able to use MSBuild with 14.0 only, without VS 2013 installed.
I'm using 14.0 MSBuild at:
C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe
The following works because I also have Visual Studio 2013 installed with the appropriate SQL Server Data Tools:
MSBUILD "C:\Users\XYZ\Desktop\temp\Testing\TestProject\TestProject.sqlproj" /t:build "/p:Platform=AnyCPU" /t:deploy "/p:TargetConnectionString=Data Source=localhost;IntegratedSecurity=True" /p:TargetDatabase=TestDeployDb /p:Configuration=Release /p:VisualStudioVersion=12.0
However, if I change "VisualStudioVersion" to "14.0 for VS 2015, I get an error:
Deploy error Deploy72002: Unable to connect to master or target server 'TestDeployDb'. You must have a user with the same password in master or target server 'TestDeployDb'.
Credit to Cole Wu for saying my connection string was invalid, but his answer didn't work for me out of the box. For some reason my connection string was* valid for 12.0 but not for 14.0.
The issue ended up being that I had IntegartedSecurity rather than Integrated Security, which broke my command when moving to 14.0
Here is the final that worked:
MSBUILD "C:\Users\XYZ\Desktop\temp\Testing\TestProject\TestProject.sqlproj" /t:build "/p:Platform=AnyCPU" /t:deploy /p:TargetConnectionString="Data Source=localhost;Integrated Security=True" /p:TargetDatabase="TestDeployDb" /p:Configuration=Release /p:VisualStudioVersion=14.0
According to your description, I create a demo and reproduce your issue on my side, you use an incorrect connection string. please modify your command like this:
MSBUILD "C:\Users\XYZ\Desktop\temp\Testing\TestProject\TestProject.sqlproj" /t:build "/p:Platform=AnyCPU" /t:deploy /p:TargetConnectionString="Data Source=localhost;IntegratedSecurity=True" /p:TargetDatabase="TestDeployDb" /p:Configuration=Release /p:VisualStudioVersion=14.0

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