Skip to content

Instantly share code, notes, and snippets.

@booyaa
Last active September 21, 2022 09:56
Show Gist options
  • Save booyaa/4086403 to your computer and use it in GitHub Desktop.
Save booyaa/4086403 to your computer and use it in GitHub Desktop.
SSIS package semver example

i've created a User variable called VersionString with this expression code.

@[System::MachineName] + " v" + (DT_STR,4,1252) @[System::VersionMajor] + "." + (DT_STR,4,1252) @[System::VersionMinor] + "." + (DT_STR,4,1252) @[System::VersionBuild]

n.b. I ended up ditching creating an extraneous variable called ```VersionPatch`` because you can't query it via msdb.dbo.sysssispackages so it's fucking useless.

references

where it all began - http://semver.org/ tl;dr - major - breaking changes, minor - feature, with backward compatibility, build - patches and unfortunately saves. heavily inspired by http://sqlblog.com/blogs/andy_leonard/archive/2010/01/06/ssis-snack-package-version.aspx

changelog

20130704 - added machinename so you can tell if you ran the package locally or on the server.

20121116 - created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment