Is there a way or query by which I can find the version number of SSIS packages (*.dtsx files)?
I have the *.dtsx
files in my Team Foundation Server for which I wanted to know.
The manual way is to do a mouse right-click on the package and click Compare
to see the VersionBuild
but there are like thousands of packages so doing it manually is really not possible
Note: The process should be automated, not manual
You can use this query if you use project deployment solution (If you have SSISDB in your server) :
Note: Integration Services must be installed
Getting values within dtsx packages
If you are trying to read a package version within this package you can access to one of the SSIS system variables
If you are looking for Package SQL Server Version, you can find it inside the
dtsx
file if you open it as text (or xml) And search forPackageFormatVersion
property, detailed informations are provided in the following links:Getting values from .dtsx files stored in Sql server
You can follow these links:
it contains queries that achieve this issue
Getting values from .dtsx files not stored in Sql server
To automate reading
PackageFormatVersion
you can use read it programmatically using anXMLParser
orRegex
. I wrote a code in Vb.net that useRegex
and loop over.dtsx
files inside a directory and get thePackageFormatVersion
property and other properties found in dtsx file header:First i created a Class named
PackageInfo
that contains properties listed aboveUsing RegEx
The following line of code is the one that read the
PackageFormatVersion
property from the fileUsing Xml Parser
Demo App
I Created A Demo Application to achieve this procedure you can download it from the following link:
Also i created a new Git-repository for this demo app
App screenshot
Getting values from .dtsx files Using TSQL
You can Read my answer at DBA.StackExchange :
PackageFormatVersion Table
And Here is the
PackageFormatVersion
table values.ispac
file is zip file actually and every.dtsx
is XML file with all required information inside it. additionally to answer that friends sent,XML itself hold all of information that you want.I hope this helps you :)