Deploying and Configuring SSIS Packages Module 13 The 20767A-MIA-SQL virtual machine used in the lab for this module includes a large number of software services that can take a while to start. For the best experience, have students start the MSL-TMG1, 20767A-MIA-DC and 20767A-MIA-SQL virtual machines at the beginning of the module so that the services are ready before they start the lab. Deploying and Configuring SSIS Packages
Planning SSIS Package Execution Module Overview 13: Deploying and Configuring SSIS Packages Planning SSIS Package Execution
Lesson 1: Overview of SSIS Development 20767A Lesson 1: Overview of SSIS Development 13: Deploying and Configuring SSIS Packages Deployment Model Comparison Question How many different deployment models are available when using SSIS in SQL Server 2016? Give the name and a brief description of each of the models. Answer There are two deployment models available when using SSIS in SQL Server 2016: Package Deployment—you can deploy one or more packages at once. Project Deployment—you can deploy a whole project.
SSIS Deployment Models 20767A SSIS Deployment Models 13: Deploying and Configuring SSIS Packages Package Deployment Model One or more SSIS Packages are deployed at once Project Deployment Model Multiple packages are deployed in a single project Destination for Deployment Options depend on deployment model
Package Deployment Model 13: Deploying and Configuring SSIS Packages Storage SSISDB File System Package Configurations Property values to be set dynamically at run time Package Deployment Utility Generate all required files for easier deployment
Project Deployment Model 20767A Project Deployment Model 13: Deploying and Configuring SSIS Packages The SSIS catalog Storage and management for SSIS projects on an SQL Server instance Folders A hierarchical structure for organizing and securing SSIS projects
Deployment Model Comparison 13: Deploying and Configuring SSIS Packages Key differences between models Feature Package Deployment Model Project Deployment Model Unit of deployment One or more packages Project Storage Packages and all associated files can be copied to the file system of a local or remote computer. They can also be deployed to the SSIS catalog, or a folder within the catalog, of an instance of SQL Server. A project is deployed to the SSIS catalog, or a folder within the catalog, of an instance of SQL Server. Dynamic Configuration Both projects and packages can contain parameters and references to environments. You can access the parameters and environment references by using the Configure Dialog Box. Compiled Format Packages and associated resources are each stored as single files in the file system. The entire project might consist of many files. The entire project is compiled as a single file (with an .ispac extension). Troubleshooting To log events, you have to add a log provider to the package and configure logging for each one individually. Events are automatically logged and saved to the catalog. These events can then be displayed with views such as catalog.executions and catalog.event_messages.
Lesson 2: Deploying SSIS Projects 20767A Lesson 2: Deploying SSIS Projects 13: Deploying and Configuring SSIS Packages Demonstration: Deploying an SSIS Project Question You can add an environment variable to an SSIS Project, and assign a value to it, which may be, for example, Test or Production. ( )False ( )True Answer (√)True
Creating an SSIS Catalog 13: Deploying and Configuring SSIS Packages Pre-requisites SQL Server 2012, 2014 or 2016 SQL CLR enabled Creating a catalog Use SQL Server Management Studio One SSIS catalog per SQL Server instance Catalog Security Folder Security Object Security Catalog Encryption Sensitive Parameters
Environments and Variables 13: Deploying and Configuring SSIS Packages Environments Execution contexts for projects Variables Environment-specific values Can be mapped to project parameters and connection manager properties at run time
Deploying an SSIS Project 13: Deploying and Configuring SSIS Packages Integration Services Deployment Wizard Visual Studio SQL Server Management Studio
Viewing Project Execution Information 13: Deploying and Configuring SSIS Packages Integration Services Dashboard provides built-in reports Additional sources of information: Event handlers Error outputs Logging Debug dump files
Demonstration: Deploying an SSIS Project 13: Deploying and Configuring SSIS Packages In this demonstration you will see how to: Configure the SSIS environment Deploy an SSIS project Create environments and variables Run an SSIS package View execution information If the execution of any package fails during the demonstration (which could happen if, for example, you enter an incorrect value for a parameter) take the opportunity to use the Integration Services Dashboard to show your students how to debug a failed execution. If you have time, you could even enter an incorrect value deliberately to demonstrate some of the debugging features of SSIS. Preparation Steps Start the MSL-TMG1, 20767A-MIA-DC and 20767A-MIA-SQL virtual machines. Demonstration Steps Configure the SSIS Environment Ensure 20767A-MIA-DC and 30767-MIA-SQL are started, and log onto 20767A-MIA-SQL as ADVENTUREWORKS\Student with the password Pa$$w0rd. In the D:\Demofiles\Mod13 folder, run Setup.cmd as Administrator. When prompted press y, and then press Enter. Start SQL Server Management Studio and connect to the localhost database engine using Windows authentication. In Object Explorer, right-click Integration Services Catalogs, and click Create Catalog. In the Create Catalog dialog box, note that you must enable CLR integration when creating an SSIS catalog, and that you can also choose to enable automatic execution of the stored procedures used by the catalog when SQL Server starts. Then enter and confirm the password Pa$$w0rd, and click OK. In Object Explorer, expand Integration Services Catalogs, and then right-click the SSISDB node that has been created, and click Create Folder. In the Create Folder dialog box, in the Folder name box, type Demo, and click OK. Expand the SSIDB node to see the folder, and then minimize SQL Server Management Studio. (More notes on the next slide)
Lesson 3: Planning SSIS Package Execution 13: Deploying and Configuring SSIS Packages Implementing SSIS Agent Jobs and Schedules Question Which of the following methods for running an SSIS package would be most appropriate if you want to schedule the package to run at regular intervals? ( )Option 1: SQL Server Management Studio ( )Option 2: Dtexec ( )Option 3: Dtexecui ( )Option 4: Windows PowerShell ( )Option 5: SQL Server Agent Answer (√) Option -2: SQL Server Agent
Options for Running SSIS Packages 13: Deploying and Configuring SSIS Packages SQL Server Management Studio Specify values for environment and any parameter Modify settings for the connection managers Specify logging options Dtexec and Dtexecui Dtexec provides command line to run SSIS packages Dtexecui is GUI to run Dtexec PowerShell Powershell cmdlets make it easier for you to manage, monitor and execute SSIS packages Can integrate SSIS with other Windows Powershell tasks SQL Server Agent Automates tasks in SQL Server Particularly useful for SSIS packages
Scheduling the ETL Process 20767A Scheduling the ETL Process 13: Deploying and Configuring SSIS Packages Data acquisition time windows Ascertain the best time to extract data from the live systems Package execution order Ensure that packages execute in the correct order One step is completed before the next is started Execution dependencies Some packages require others to have already run due to data dependencies
Configuring Execution Context 20767A Configuring Execution Context 13: Deploying and Configuring SSIS Packages Create a credential in the SQL Server instance Create an SQL agent proxy that maps to the credential Activate it for the SQL Server Integration Services Package job subsystem Configure package execution job steps to run as the proxy
Where to Handle Notifications 13: Deploying and Configuring SSIS Packages Notifications can be handled from: SSIS package – using SendMail task SQL Server agent job – using operators
Where to Handle Logging 13: Deploying and Configuring SSIS Packages Logging can be handled by: SSIS – consider using Integration Services Dashboard SQL Server Agent job – logging enabled by default
Combining SSIS Tasks with Other Tasks 13: Deploying and Configuring SSIS Packages Create modular packages Augment SSIS packages with SQL Agent tasks Ensure all processes are documented
Implementing SSIS Agent Jobs and Schedules 13: Deploying and Configuring SSIS Packages Select a Windows account that SQL Server Agent will use. Create job subsystem proxies if required. Set SQL Server Agent service to start automatically. Create the required jobs and schedules.
Lab: Deploying and Configuring SSIS Packages Exercise 5: Scheduling SSIS Packages with SQL Server Agent If the execution of any package fails during the lab—which may happen if, for example, a student enters an incorrect value for a parameter—encourage the student to use the Integration Services Dashboard to see how to debug a failed execution. If you have time, you could even enter an incorrect value deliberately to demonstrate some of the debugging features of SSIS. Exercise 1: Creating an SSIS Catalog You will use Transact-SQL to enable the SQL CLR and then create an SSIS Catalog and a folder to contain the Adventure Works ETL solution. Exercise 2: Deploying an SSIS Project You now want to deploy an existing SSIS project, created in Visual Studio, to the new folder from the previous exercise. Exercise 3: Creating Environments for an SSIS Solution You have parameters and connection managers in an SSIS package. You would like to create test and production environments with which to quickly pass the correct values to these parameters when switching from test to production. Exercise 4: Running an SSIS Package in SQL Server Management Studio Now you have deployed the SSIS project and defined execution environments, you can run the packages in SQL Server Management Studio. Exercise 5: Scheduling SSIS Packages with SQL Server Agent You’ve tested the packages by running them interactively. Now you must schedule them to be executed automatically. Logon Information Virtual machine: 20767A-MIA-SQL User name: ADVENTUREWORKS\Student Password Pa$$w0rd Estimated Time: 45 minutes
20767A Lab Scenario 13: Deploying and Configuring SSIS Packages You have completed the SSIS project containing the packages required for the data warehouse ETL process. Now you must deploy the project to an SSIS catalog, configure environments for dynamic configuration, and schedule automatic execution of packages.
Module Review and Takeaways 13: Deploying and Configuring SSIS Packages Review Question(s) Review Question(s) Question What are the advantages of the project deployment model? Answer The project deployment model makes the process of managing your deployed project more straightforward. You can administer everything in SQL Server Management Studio, organize projects into folders, and use environments to pass values to parameters. What are the advantages of environments? You can create multiple scenarios, such as test and production, using environments. You can assign variable values to these environments, and then switch between them with a single property edit. Where would you handle notifications? This discussion topic has no right or wrong answer. Consider the implications of putting notifications in Jobs and SSIS projects. Consider that an SSIS package might not always run in an SQL Server Agent job, and that an SQL Server Agent job might have other steps apart from the SSIS package. Describe the new feature available in SQL Server 2016 for Deploying SSIS Packages. What are the benefits? Selected packages within a project can be deployed using SQL Server 2016. This should save time as previously the only options were to deploy one package at a time or a whole project.