Important, please read!
Hi, I noticed something weird when upgrading my packages as described below, and thought it would be fair to share this with you.
Script Tasks might not get upgraded well
There seems to be an issue with upgrading packages with Script Tasks in it. The packages I upgraded with just plain SSIS stuff did not have that problem.
The following warnings are given:
Warning 0x40016044: DFT_Export_Person: Found SQL Server Integration Services 2012 Script Component SCR_Add_RowNumber that requires migration!
Warning 0x40016044: SCR_Foo_Bar: Found SQL Server Integration Services 2012 Script Task “ST_a1fbd3cd5d924758a2c98397289876d0” that requires migration!
However, the wizard still says that the upgrade is successful:
The message that the upgrade is successful
I think these warnings should be big fat errors and I will show you why.
Before the upgrade: the script task has a ReadOnlyVariable and a ReadWriteVariable
Before the upgrade: the script task has code in public void Main()
After the upgrade: the script task does not have the ReadOnlyVariable nor the ReadWriteVariable
After the upgrade: the code in public void Main() has disappeared
As you know I am not anti-Microsoft, in the past I have thanked them for being so cool towards developers.
But as far as this upgrade process is concerned I wonder: what must the developer at Microsoft have thought when making this a warning instead of an error? Was it monday morning, was he or she drunk or on drugs? I don’t know, the package is now cripple and will not work. That is not a warning.
So I “warn” you, pay attention to your script tasks, if you use them.
Use “Upgrade All Packages” option
After upgrading, my builds started to take a lot of time (up to 4 minutes, I suspect an on-the-fly upgrade was being done). While investigating this, I found that in the project file all packages are also listed with a PackageFormatVersion per package in it, which was still 6!
I am not sure if this is a Visual Studio bug, if the PackageFormatVersion of the dtsx file says 8, while the dtproj file says 6 for the same package.
Anyway, after I modified the procedure slightly, my builds were fast again (20 seconds instead of 4 minutes).
To achieve this, I opened the SSIS 2012 project using Visual Studio 2015, then chose Upgrade All Packages from the contextmenu.
After that I changed the TargetServerVersion as described below.
Sorry for any inconveniece caused by my initial article, and I hope this update will help.
(The original post starts below)
If you are intending upgrading your SQL Server installations to 2016, you’ll probably want to do the same with your SSIS packages.
And I can tell you, coming from SQL Server 2012 or 2014 this is fairly easy to do.
But with my experience I want to help you doing this not the wrong way.
I made the mistake by using the SSIS Package Upgrade Wizard while the projectversion still was SQL Server 2012.
Funny thing is that the packages seemed to upgrade, however I got all kinds of errors and they just did not work.
While the solution seemed so easy.
For this article I prepared a SSIS project made with SQL Server 2012.
In the picture below you can how it looks like when opened with SQL Server Data Tools 2015 on a Server with SQL Server 2016 installed.
After the project name, between brackets you can read that this is a SSIS 2012 project.
Also, if you open a package in Notepad (be careful not to change it) you can see that the PackageFormatVersion is 6. This means SQL Server 2012.
The simplest way to upgrade all packages in the project is to change the version of the SSIS project! Please be sure to backup your entire project and all SSIS packages first.
To upgrade all packages, right click on the project node (in the picture on SSIS-E09-Packages (SQL Server 2012) and select Properties.
Then select Configuration Properties and change the TargetServerVersion to SQL Server 2016.
Changing the TargetServerVersion ..
Then read the message, follow the instructions and click Yes.
Upgrade instructions and warning
The good news is, that’s basicly it! When you open a package with Notepad again, you can see that it is upgraded to PackageFormatVersion 8. This means SQL Server 2016.
Package which is upgraded to PackageFormatVersion 8 (SQL Server 2016).
In my experience with more complex packages than used for this demo, they all upgraded with no problems. I used all the standard SSIS components. Script Tasks and Script Components did not have to be recompiled.
Still a warning about the Upgrade All Packages menu item, available from the SSIS Packages node. You don’t need it if you simply change the TargetServerVersion of the project as just described. If you use Upgrade All Packages with the wrong TargetServerVersion it seems to work, but the output packages do not work.
The Upgrade All Packages menu-item
Conclusion / Wrap up
When you do it the right way, upgrading SSIS Packages from 2012 to 2016 is easy to do. However I did not test this with 2014, I am quite sure it will work in the exact same way.
As you might have noticed I have changed the frequency of my blog posts, due to several circumstances. I still try to do 2 or 3 a month.
Last updated: 27 November, 2016.
(c) 2016 hansmichiels.com – Do not steal the contents – spread the link instead – thank you.