Referring external dll in the SSIS package deployed in SQL Server - sql-server

I have created SSIS packages on VS 2010 shell and I am able to successfully deploy my packages to SQL Server and referring external .NET dll in the data flow script component to perform some activities.
May i know steps to deploy the .NET dll in the database server to execute the DTSX deployed in SQL server ?

You won't deploy the external DLLs into SQL Server to support your SSIS packages. Instead, you're going to need to sign the assemblies and then deploy them into the Global Assembly Cache - GAC.

Related

Upgrade SSIS Package Using SMO to SQL Server 2019

I have a SSIS package that was originally developed to target SQL Server 2015 that does a variety of things in C# Scripts using SQL Server Management Objects (SMO) that now needs to be upgraded to target SQL Server 2019. Eventually, this package is deployed to the server to run in a SQL Agent Job.
Starting in SQL Server 2017, SMO was moved to a NuGet package and is no longer included in SQL Server Feature Packs as it was for previous versions.
The issue I have is that Integration Services Projects do not really support NuGet. As discussed in the below link:
SSIS Script Task cant find reference to assembly
As mentioned in the above ticket, I believe I could manually install the .dll's to the server if necessary but I am curious if there are other solutions to this issue.
Questions:
Is there a way to get Script Tasks in SSIS packages to utilize the SMO NuGet?
If "no" to the above, is there another common method of executing C# script via SQL server other than installing the .dll's to the server?
You would be better off installing SMO DLLs into target server Global Assembly Cache. SSIS still does not use local assemblies and you have to introduce some workarounds to defeat that.
You can do a simple MSI installation with SMO DLLs - for example see WIX deploy two assemblies to GAC or What's the 'correct' way of registering/installing an Assembly to the GAC?.

SSIS Package works in VS when imported from SQL Server but fails when imported from File system (error SSIS.Replacement Task not register for use)

I have SSIS Package for SQL Server 2017. And I want to edit it visual studio. This packages is already deployed to Intergation Services and SQL Agents jobs executing this packages run without any error.
The required SSIS custom components/Task are register in GAC and also added to visual studio.
I export SSIS Package from Integration Services to file system and import this package to Integration Services project then I get following error for all custom tasks/components
The task name 'custom task' and the Creation Name SSIS.ReplacementTask is not register for use on this computer
But when I import the same package directly from SQL Server to Integration Services project then it loads and runs without any error.
I saw XML for both the packages and I could see the one which is downloaded from SSIS has Creation Name for all customs components as SSIS.Replacement Task but its correct in the package which is directly imported from SSIS in visual studio.
Can anybody tell me why is this happening? What difference it makes in directly importing package from SQL server and downloading it to file system and then importing? Is there any solution to avoid this error?

How does Visual Studio SSIS Handle Extensions and Package Deployment?

I'm fairly new to Visual Studio and SSIS and was wondering if someone could just clear up for me how Visual Studio SSIS Projects and Visual Studio in general handle Add-In Extension and Package Deployment.
The Scenario: I am currently developing and creating a Visual Studio SSIS Package on my local machine.I need to use an extension from the Tools > Extensions and Updates which just links me to a webpage.I need to install this and use it to make a package which I will deploy to the Integration Services Catalog on a SQL Server 2014 that does not have Visual Studio installed. When I deploy this project as a package will the things the extension did be baked into the package or is it like references where I will need to install the extension on the server that will be running the package via SQL Agent Job. Thanks, any help is appreciated.
When you deploy a package to the catalog, all libraries/extensions (eg.azure connection etc) are deployed along-with, so no special treatment is needed. But many a times you will need to ensure your frameworks( eg. .net 4.0 etc) exist for the extension to be executed on the integration services server you are deploying to.
In some cases you have to register the dlls using GACUtil, to the integration services server. Your custom tool installation instructions will specify that.

ispac file deployment errors out when build/deploy from visual studio works fine

We have two packages as part of one job. We copied these same packages from one SQL Server Integration Services Catalog SSISDB folder to another SQL Server in the same Integration Services Catalog SSISDB folder (same namespace). When running this job on the new server with the packages copied, the job runs but fails and also does not produce an error message (we have any error message logged).
When building and deploying from Visual Studio these same two packages to the same SSISDB folder and then running the job, the job runs as expected.
When deploying via the .ispac file, the script tasks we have error out with with
ScriptTaskName: There was an exception while loading ScriptTask from XML:
System.Exception: The Script Task "ST_0001a..." uses version 15.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
MicrosoftSqlServer.Dts.Tasks.ScriptTaskScriptTaskLoadFromXML(XmlElement
elemProj, IDTSInfoEvents events)
How come only the build and deploy way makes the packages work as intended?
There are several possible causes of such error.
First - you should update your version of SSDT from MS to the latest, set up correct target SQL Server version in the project properties and rebuild the packages. It might be the case when this property is reset to SQL vNext.
There are statements that your version of SSDT contained errors leading to this error.
Second - by some reason when deploying .ispac from SSMS or by clicking it at File Explorer, SSMS implicitely upgrades the project and packages in it to its own version. Detailed report on this behavior. I suspect you have SSMS 2017 and it performs such implicit upgrade of Script tasks to version 15.
If you want to deploy package by Support Team without using SSMS, here is the way. Use IsDeploymentWizard - Microsoft utility to manage package and project deployment. It has both GUI and command-line parameters to handle the deployment.
Here is a sample from one of projects:
isdeploymentwizard /S /SP:"D:\Project\Proj.ispac" /DS:"myserver\instance" /DP:"SSISDB/ProjectFolder"
Ensure that IsDeploymentWizard is started from SQL bin directory %ProgramFiles%\Microsoft SQL Server\130\DTS\Binn, not from SSMS.

Can I deploy & Use SSIS SQL server DTS DLL's onto a machine that does not have SQL server 2008 installed?

Greets.
I've developed some SSIS packages that I want to load up and execute in C# code. The C# code is deployed on our application machine.
I've referenced the SQLServer.ManagedDTS DLL in my C# project.
I tried gac'ing that DLL on our staging application box, which incidentally also seemed to require gac'ing the SQLServer.DTSRuntimeWrap DLL as well.
The code to execute the package is like so
Runtime.Package package = new Runtime.Application().LoadPackage(ssisPackageFilePath, null);
package.Variables["FilePath"].Value = sourceFilePath;
//Excute Package to insert data from source csv file into a SQL table
Runtime.DTSExecResult results = package.Execute();
When I try to run the process I get the following error
An Integration Services class cannot be found.
Make sure that Integration Services is correctly installed on the computer that is running the application.
Also, make sure that the 64-bit version of Integration Services is installed if you are running a 64-bit application
I figured I should be able to simply gac (Install) the one DLL I used to develop the code that executes an SSIS dtsx package file.
I developed the package in a Visual studio 2008 BIDS project which results in a dtsx file.
I referenced the SqlServer.ManagedDTS DLL in a visual studio 2010 project to execute the dtsx file from code.
Tested and debugged locally with success.
What do I need to do to setup my application box in order for my code to be able to execute an SSIS package?
I'm hoping I'm not limited to only being able to execute packages from code on a box that has an instance of SQL server or IntegrationServices installed; which may mean the need for another license.
Do I need to install Integration Services on my app box?
Yes, you need to install Integration Services to run the package on a server. Just deploying DLLs into GAC won't help in executing a package.
Here is the MSDN link that describes about Running an SSIS Package Programmatically on a Remote Computer.
You need to have at least one server with Integration Services installed to be able to do what the MSDN article describes.

Resources