#SQLSatDenmark
Automate your SSIS
deployment process
Bartosz Ratajczyk
#SQLSatDenmark
BIG Thanks to SQLSat Denmark sponsors
#SQLSatDenmark
What is he talking about?
About making deployments easier
removing manual tasks
Things tested in practice
starting with small steps
From multiple scripts to one script deployment
or using one/two steps in TFS
How to build your own solution
About different options and hurdles
#SQLSatDenmark
I will not cover
Single package deployments
Best practices
DevOps
#SQLSatDenmark
Bartosz Ratajczyk
SQL Server Consultant @ 7N
Speaker
SQL Saturday volunteer
Advisory Board Member in Data
Community Poland
MCSE, MCT
http://bartekr.net b.ratajczyk@gmail.com
#SQLSatDenmark
All deployment steps
Client side
1. Compile project
2. Deploy project
Server side
1. Create folder
2. Create environment
3. Reference environment
4. Create environment variables
5. Configure project
6. Validate project
7. Verify validation
8. Test run
Testing (NBi, LegiTest)
Naming convention compliance (ie. Jamie Thomson)
#SQLSatDenmark
Raising the bar
Version control
DEV, TEST, PROD branches
Different servers
DEV, TEST, QA, PREPROD, PROD
Different configurations
Drive letters, folder names
Connection strings
We have more than one project
#SQLSatDenmark
MAKING THE WORK EASIER
Let’s start
SQLDay 2017
#SQLSatDenmark
Compile project – first steps
#SQLSatDenmark
Compilation problems
EncryptAllWithPassword, EncryptSensitiveWithPassword
Manual password entry
The devenv.com process can hang
#SQLSatDenmark
Handcrafting the package
#SQLSatDenmark
MSBuild
#SQLSatDenmark
SSISMSBuild
SSIS compilation and deployment tasks for MSBuild
DeploymentFileCompilerTask
DeployProjectToCatalogTask
Source code, build yourself the .dll
https://www.simple-talk.com/sql/ssis/deployment-automation-for-sql-server-integration-services-ssis/
https://seddryck.wordpress.com/2016/12/27/building-the-msbuild-tasks-for-ssis-2016/
http://sqlsrvintegrationsrv.codeplex.com
#SQLSatDenmark
Compilation: Build.proj
#SQLSatDenmark
Deployment – IsDeploymentWizard
IsDeploymentWizard.exe
/Silent
#SQLSatDenmark
IsDeploymentWizard /Silent
/Silent == fire and forget
There might be a situation, where /Silent has problems
e.g. external library in Script Task
#SQLSatDenmark
MSBuild, again
#SQLSatDenmark
DEMO
Compilation and deployment
SQLDay 2017
#SQLSatDenmark
Other methods
PowerShell script using SMO
http://muxtonmumbles.blogspot.dk/2013/11/ssis-project-deployment-and-visual.html
SSISBuild
http://roman.tumaykin.com/tools/2017/01/10/Continuous-integration-of-SSIS-projects-Part-1-build.html
PowerShell Continuous Integration (PSCI)
https://github.com/ObjectivityLtd/PSCI
SSIS Build & Deploy
https://marketplace.visualstudio.com/items?itemName=TG.VSTS-SSIS
#SQLSatDenmark
What’s with the name?
#SQLSatDenmark
Compilation: Build.proj (again)
#SQLSatDenmark
Handling the Environments
Visual Studio Configuration Manager
PowerShell + SMO
Array
CSV
Database
JSON
#SQLSatDenmark
Configuration Manager
#SQLSatDenmark
Configuration Manager - usage
Different parameter values for different configurations
(think: local environments)
Contained in .dtproj files
No single window to configure them all
#SQLSatDenmark
#SQLSatDenmark
Create the Environment
Environment-<NAME>.csv
#SQLSatDenmark
Reference the Environment
#SQLSatDenmark
Configure the project
Environment-<NAME>-Configuration.csv
#SQLSatDenmark
Data sensitivity
Encryption
http://www.codewrecks.com/blog/index.php/2014/07/12/store-secure-password-in-tfs-build-definition/
Certificates
http://www.codewrecks.com/blog/index.php/2014/08/09/encrypt-your-password-in-tfs-build-using-certificates/
#SQLSatDenmark
DEMO
Create the environment and configure the project
SQLDay 2017
#SQLSatDenmark
Validation
Validation is an asynchronous process
We start the process and track the progress
#SQLSatDenmark
Validation from code
::UseAllReferences
::SpecifyReference, $reference
#SQLSatDenmark
Test run – the job
#SQLSatDenmark
DEMO
Validation and test
SQLDay 2017
#SQLSatDenmark
What else?
NBi tests
Jamie Thomson’s naming convention
http://www.nbi.io/
http://microsoft-ssis.blogspot.dk/2016/12/ssis-naming-conventions.html
#SQLSatDenmark
And how about TFS?
Custom proces for building and deployment
You can expand it with PowerShell steps to
control environments, validation, …
#SQLSatDenmark
DEMO
Automatic proces using TFS
SQLDay 2017
#SQLSatDenmark
So simple!
The work is still boring, but this time the computer does it
For automation use
MSBuild
Powershell
SMO
Use additional software for CI/CD process
#SQLSatDenmark
BIG Thanks to SQLSat Denmark sponsors

SqlSaturday Denmark 2017 - Automate your SSIS deployment process