Upgrade custom SSIS Tasks from 2008 R2 to 2012 - sql-server-2008

I have several custom SSIS Tasks and Components implemented for SQL Server 2008 R2. Now we want to switch to SQL Server 2012. First I tried just to open my DTSX packages in VS 2010 and no package could be loaded. Does anybody knows what I have to change in my projects that I can use my tasks and components with SQL Server 2012.
Thanks

Assuming you've installed SQL Server 2012 and SQL Server Data Tools, you should be prompted to upgrade your solution when you open it. I'm also assuming your 2008R2 assemblies are setup for signing.
After going thru the upgrade wizard you need to do several things:
Change your custom tasks and components to target the .NET 4
Framework in each of the project properties, in the Application Tab,
under Target framework.
Update the assembly references in each of your projects to point to
the appropriate SqlServer dlls.
Build and copy your project dlls to the appropriate directory,
depending on what kind of components you are updating, i.e. Program
Files (x86)\Microsoft SQL Server\110\DTS\PiplelineComponents
Program Files (x86)\Microsoft SQL Server\110\DTS\Tasks
Register your components in the GAC.
Close Visual Studio and then reopen; open your SSIS packages and
refresh the SSIS Toolbox, by right clicking in the tool box and
selected Refresh Toolbox.
You can get more detailed info here http://msdn.microsoft.com/en-us/library/ms345161.aspx

Related

Copy a SSIS project/package from Visual studio 2017 to 2008 (partial ease accepted)

I have created several packages in Visual Studio 2017 (SSDT) SSIS solution, they are showing target server 2017. This was on my development PC. Now, upon completion of it, I am into a challenge. The Server on which, I am moving my packages, is having Visual Studio 2008.
I can understand that downgrading may not be right away possible, but I will still be happy if I can find a way to minimize my work (i can accept package by package or so). Please note I am accessing the other server on the Remote and not able to use Ctrl+C and Ctrl+V to copy and paste package objects, so if I don't get some easy ways then have to almost write the whole package again.
Thanks for your support.
Install BimlExpress in your Visual Studio 2017 environment. Once installed, you should be able to right click on the package and with your new BimlExpress options, select Convert SSIS Packages to Biml
In the Miscellaneous section of you SSIS project, you should have a BimlScript.biml file. That is the Biml representation of an SSIS package but in a much more terse, yet user friendly syntax. This XML describes in a version independent way what the SSIS package did. Here's where it's cool as a cucumber: The Biml for a 2005 SSIS package is exact same as a 2019 package and vice versa. The Biml Engine has to "know" how to translate the package definition into version specific .dtsx but the smart folks at Varigence have already solved that problem.
Now, you need to take that generic Biml and match it up to a Visual Studio 2008/2010 installation that has the Business Intelligence Design Studio (BIDS) bits installed on it. For SQL Server 2005/2008, BIDS only came on the SQL Server installation media as that is how the product is licensed. A developer license cost 25-50 USD but you can no longer purchase it. Hopefully, the target server has BIDS installed on it.
If so, then you need to find a copy of BidsHelper or maybe the renamed product BI Developer Extensions and then you can use the Biml engine embedded in that product to emit a 2008 correct package.
If none of that works, you can try getting a free 7/14 day license for BimlStudio and the 2018 release still allows for the targeting of SSIS 2008.
Now, all of that supposes you haven't used any features in SSIS 2012+ that didn't exist in 2008 (Expression tasks, Parameters, project connection managers, etc) and I doubt a Script Task/Component is going to downgrade but the good news there is you should be able to mostly copy/paste the code into the 2008 version of the object.

Deploy SSIS Script to Toolbox

I am trying to deploy a Script component to SSIS toolbox in the Data Flow for reuse. I'm using visual studio 2010, and SQL server 2014.
I have created the script, Signed the assembly, used Gacutil.exe /i on the DLL file to add it. It now recedes in the GAC_MSIL folder under it's strong name folder.
The above procedure is the current way I'm trying to get it to work, but I have additionally tried to use SN utility to generate a strong name and add this key back into the build. Didn't work any better than the above procedure. Is it supposed to be next to impossible to add custom components to SSIS?
In my simple mind it should be just sign, build, GAC and done.
The editor for SSIS packages is tightly bound to the version of the SQL Server you're working with.
As a general reference, we have the following
VS 2005 = SQL Server 2005 {90}
VS 2008 = SQL Server 2008 & SQL Server 2008 R2 {100}
VS 2010, VS 2012 = SQL Server 2012 {110}
VS 2013 = SQL Server 2014 {120}
VS 2015 = SQL Server 2016 (once it's RTMed) {130}
Now, you could be using VS 2010 to build your custom DLL, as long as you've referenced the correct version of the SSIS DLLs, and then used SSDT-BI edition for VS 2013 to author your SSIS packages --- that's fine.
Making it work
Your current build and deploy cycle is what you need to do on your servers. That will allow SSIS to find the components when it runs.
However, you need the development experience so you need to also add that same DLL into the correct folder in your SQL Server installation. For SQL Server 2014, a custom "Script Component", or anything that lives in the data flow, would also need to be copied to
C:\Program Files\Microsoft SQL Server\120\DTS\PipelineComponents
If you've done it properly, then items automatically show up for VS 2010+. VS 2005/2008 required an additional step of explicitly adding tasks and components into the Toolbox.
If they aren't showing then you've either
built your DLL against the wrong version of the SSIS framework
using the wrong version of SSIS tools
not deployed the DLL to both the GAC and the correct DTS subfolder based upon your SQL Server version.
Clear as mud?

Visual Studio 2015 Integration Services project does not pick up my custom SSIS component

My development environment: SQL Server 2014, Visual Studio 2015, SQL Server Data Tools Preview (September) for Visual Studio 2015
I have a custom SSIS source component that I can successfully use on another SQL 2014 box with VS 2013 and SQL Server Data Tools - Business Intelligence. However, this component does not show up in the toolbox in VS 2015 Integration Services project.
The component is located in c:\Program Files (x86)\Microsoft SQL Server\120\DTS\PipelineComponents. It is also registered in GAC.
Do I need to make changes to the component so that it will work with VS2015?
More general question: how to troubleshoot issues like this?
I've managed to get the problem of adding a custom SSIS component to a Visual Studio 2015 SSIS package. This maybe have been enabled by the release of SQL Server 2016 CTP 3.2, but I thought that I'd put this out there in case it helps anyone.
First of all let me just let everyone know what system I'm using in case this doesn't work for everyone:
My system is: Windows 8.1 64 bit
Visual Studio Community 2015 Version 14.0.24720.00 Update 1
Microsoft SQL Server Integration Services Designer Version 13.0.900.80 (I've installed the SQL Server 2016 CTP3.2 so the version of SSIS is this version - this may be part of the problem and it isn't a fully released product and this may be a bug)
Microsoft .NET Framework Version 4.6.01055
In my c# class project I used the .NET Framework 4.6
(Project Properties->Application).
I made sure that I added to the gac using the gacutil.exe in the following folder:
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools
and I copied the dll to the following folder:
C:\Program Files (x86)\Microsoft SQL Server\130\DTS\PipelineComponents
After refreshing the SSIS toolbox the component now appears in the Common folder/subsection.
I hope this works for everyone or is at least of use to anyone else who has had this problem. I was so happy after trying nearly everything and it coming up blank to see the component appear in the SSIS toolbox and know how frustrating this kind of thing can be!!!
Matt
In VS2015 Solution Explorer, right click on the .dtproj file and select properties. On the General Tab choose the SQL Server version that matches the component version. If the component worked on VS2013, choose 'SQL SERVER 14' when opening the package in VS2015.

How to run SSIS packages from an external application?

I have an application I am writing that accepts files of various formats. Then I write code for each format (csv, excel, xml) to convert it and enter it into a SQL Server database. This is fine but I was just looking into SSIS and wondering if this would help.
The main question though is how do I run these packages within my own code? Is it easy to pass parameters? If I move this web app to another server does it depend on other components being on that server (maybe SQL Server 2012 installed)? Or is it just some DLLs I can reference from my web app?
All the demos I see are about using the SSIS tool but I am more interested in how difficult it is to call packages with parameters from my code.
The BIDS/SSDT installation includes a complete client SDK that makes it pretty simple to run SSIS packages via code.
This MSDN article explains how to load and run a package via C# in detail but the actual code boils down to:
using Microsoft.SqlServer.Dts.Runtime;
.
.
.
Application app = new Application();
Package pkg = app.LoadPackage(PKG_FILE_NAME, null);
DTSExecResult pkgResults = pkg.Execute();
The Package object has a lot of properties and methods you can look into, in particular there is a Parameters collection that allows you to pass parameters into your SSIS package before execution.
There is a very cool library called EzAPI where you can generate your own packages and call them from within C#. It gives you a lot of flexibility to generate SSIS on the fly and execute.
http://sqlsrvintegrationsrv.codeplex.com/releases/view/21238
I built a couple console apps inside this project to test some of these methods and you might find the examples useful:
https://github.com/thevinnie/SyncDatabases
Look at "BuildingAPackage" and "BuildALookupPackage"
You can programmatically build SSIS packages using C# or VB.NET and then run the packages. You can also load an existing package programmatically to execute it. I have little experience with building packages this way since most of the packages can be built easily using the following tools.
Read the article Building Packages Programmatically on MSDN for more details.
I feel that it is easier to build the packages through these IDEs depending on which version of SSIS you are targeting. You can also create initial packages through SQL Server Import and Export Wizard and save the SSIS packages to the local disk, which you can later modify according to your needs.
SSIS Version Development IDE Visual Studio Shell
------------------- ----------------------------------------------- -------------------
SSIS 2005 Business Intelligence Development Studio (BIDS) Visual Studio 2005
SSIS 2008 - 2008 R2 Business Intelligence Development Studio (BIDS) Visual Studio 2008
SSIS 2012 SQL Server Data Tools (SSDT) Visual Studio 2010
You need to reference the appropriate SSIS specific DLLs in your code to create/load SSIS packages.
However, you will need a SQL Server Integration Services license to run the package. You cannot simply reference the DLLs alone. The license is usually part of your SQL Server license, if you already have one.
Response to your comment:
We will have SQL 2012 or 2008R2 on a separate server.. So I just need to paste the needed DLLs on my web server and reference them. correct ?
The packages will execute on that server. You are just remotely invoking to execute them and you should reference the appropriate DLLs in the code within your web/other form of external application. I usually schedule the packages to run on the database servers under SQL Server Agent Job. You can try that if that is an option for you.
Package parameters are read-only from an external application. You'll need to pass them in as variables (which I have done). If you are dealing with an existing package with parameters, you may consider writing a script task that populates the parameters from the variables (which I have not done).

How do I edit SSIS package files?

I have a DTSX file in a project I'm taking over. I have Visual Studio 2005 Pro, but it just opens it as an XML file. SQL Server Management Studio 2005 does the same.
I've seen people opening these files in some workflow-esque format; Business Intelligence Development Studio comes to mind.
Is this part of Visual Studio or SQL? Does it have to be purchased seperately? Can I open this file in a more useful way with the tools I have?
From Business Intelligence Studio:
File->New Project->Integration Services Project
Now in solution explorer there is a SSIS Packages folder, right click it and select "Add Existing Package", and there will be a drop down that can be changed to File System, and the very bottom box allows you to browse to the file. Note that this will copy the file from where ever it is into the project's directory structure.
If you need to open a *.dtsx file in SSDT, then see:
How do I open a DTSX file in Visual Studio 2019?
Current for 2016 link is https://msdn.microsoft.com/en-us/library/mt204009.aspx
SQL Server Data Tools in Visual Studio 2015 is a modern development tool that you can download for free to build SQL Server relational databases, Azure SQL databases, Integration Services packages, Analysis Services data models, and Reporting Services reports. With SSDT, you can design and deploy any SQL Server content type with the same ease as you would develop an application in Visual Studio.
This release supports SQL Server 2016 through SQL Server 2005, and provides the design environment for adding features that are new in SQL Server 2016.
Note that you don't need to have Visual Studio pre-installed. SSDT will install required components of VS, if it is not installed on your machine.
This release supports SQL Server 2016 through SQL Server 2005, and provides the design environment for adding features that are new in SQL Server 2016
Previously included in SQL Server standalone Business Intelligence Studio is not available any more and in last years replaced by SQL Server Data Tools (SSDT) for Visual Studio. See answer http://sqlmag.com/sql-server-2014/q-where-business-intelligence-development-studio-bids-sql-server-2014
Additional answer for Visual Studio 2012:
You can open .dtsx along with their corresponding .dtproj project files with the SQL Server Data Tools Business Intelligence (SSDT-BI) add-in:
http://blogs.msdn.com/b/mattm/archive/2013/03/07/sql-server-data-tools-business-intelligence-for-visual-studio-2012-released-online.aspx
http://www.microsoft.com/download/details.aspx?id=36843
If the projects were created with an earlier version they will require an upgrade.
I did have some hang ups installing this - the install would spin on "Install_VSTA2012_CPU32_Action" and similar steps. It wasn't until I did a repair inside of the same installer did it install completely.
Adding to what b_levitt said, you can get the SSDT-BI plugin for Visual Studio 2013 here: http://www.microsoft.com/en-us/download/details.aspx?id=42313
You need the Business Intelligence Studio ..I've checked and my version of VS2008 Pro doesn't have them installed.
Have a look at this link:
http://www.microsoft.com/downloads/details.aspx?familyid=3C856B93-369F-4C6F-9357-C35384179543&displaylang=en
I prefer to use :
(from SSDT visual studio just opened)
file> open > file > locate dtsx file > open
then you can edit work and save
If you use the 'Export Data' wizard there is an option to store the configuration as an 'Integration Services Projects' within the SQL Server database . To edit this package follow the instructions from "mikeTheLiar" but instead of searching for a file make a connection to the database and export package.
From "mikeTheLiar":
File->New Project->Integration Services Project -
Now in solution explorer there is a SSIS Packages folder, right click it and select "Add Existing Package".
Using the default dialog make a connection to the database and open the export package. The package can now be edited.