SSIS Script Task not working when called through dtexec - sql-server

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.

Related

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

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}

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.

how to install sql server

i have done a c# windows application with the back end of sql server 2008
now i want to install sql server in client machine without asking any window
i meant the customer never wont to see the sql installation i want to install it silently i have done the setup file with installsheild 2010
tanking you
Mehaboob
Assuming you want to install SQL Server 2008 Express, you can use a silent install from a custom action:
Setup.exe /ConfigurationFile=SQLExpress.ini /Q
with your SQLExpress.ini file looking like this:
[SQLSERVER2008]
INSTANCEID="SQLExpress"
ACTION="Install"
FEATURES=SQLENGINE
HELP="False"
INDICATEPROGRESS="False"
QUIET="False"
QUIETSIMPLE="False"
X86="True"
PCUSOURCE="C:\install\SqlExpress_2008\PCUSOURCE"
ERRORREPORTING="False"
INSTALLSHAREDDIR="C:\Program Files (x86)\Microsoft SQL Server"
INSTANCEDIR="C:\Program Files (x86)\Microsoft SQL Server"
SQMREPORTING="False"
INSTANCENAME="SQLEXPRESS"
AGTSVCSTARTUPTYPE="Manual"
ISSVCSTARTUPTYPE="Automatic"
ISSVCACCOUNT="NT AUTHORITY\NetworkService"
ASSVCSTARTUPTYPE="Automatic"
ASCOLLATION="Latin1_General_CI_AS"
ASDATADIR="Data"
ASLOGDIR="Log"
ASBACKUPDIR="Backup"
ASTEMPDIR="Temp"
ASCONFIGDIR="Config"
ASPROVIDERMSOLAP="1"
SQLSVCSTARTUPTYPE="Automatic"
FILESTREAMLEVEL="0"
ENABLERANU="True"
SQLCOLLATION="SQL_Latin1_General_CP1_CI_AS"
SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
SQLSYSADMINACCOUNTS="DOMAIN\Administrator"
ADDCURRENTUSERASSQLADMIN="False"
TCPENABLED="0"
NPENABLED="0"
BROWSERSVCSTARTUPTYPE="Disabled"
RSSVCSTARTUPTYPE="Automatic"
RSINSTALLMODE="FilesOnlyMode"

Resources