You are on page 1of 15

Hands-On Lab

Exploring SQL Server 2012 Integration


Services (RTM Update)
Lab version: 1.2 (RTM Update)
Last updated: 7/3/2017
CONTENTS

OVERVIEW ................................................................................................................................................... 3

EXERCISE 1: EXPLORING THE INTEGRATION SERVICES PROJECT .................................................. 5


Task 1 Opening the Integration Services Project ............................................................................... 5
Task 2 Setting the Configurations ...................................................................................................... 5
Task 3 Exploring the Master Package................................................................................................. 7
Task 4 Exploring the LoadFactSalesQuota Package ........................................................................... 9

EXERCISE 2: DEPLOYING AND MANAGING THE INTEGRATION SERVICES PROJECT .................. 10


Task 1 Creating the SSIS Catalog ...................................................................................................... 10
Task 2 Deploying the Integration Services Project........................................................................... 11
Task 3 Executing the Master Package .............................................................................................. 12
Task 4 Monitoring the Integration Services Environment ............................................................... 14
Task 5 Finishing Up ........................................................................................................................... 15

SUMMARY .................................................................................................................................................. 15
Overview
In this lab, you will commence by exploring a partially completed Integration Services project designed
to populate the Adventure Works data warehouse. You will explore the design of the packages and
specifically the use of a project connection manager and package parameters both being new features
in Integration Services for SQL Server 2012.
Next you will create the SSIS Catalog and then deploy the project to this catalog. Once deployed you will
execute the Master package and review the execution results using the dashboard and standard
reports.

Note: Before you start with this exercise you must ensure that your machine meets the system
requirements detailed in the next section. Additionally, you must complete the setup steps described in
the next section.

Objectives
The objectives of this lab are to:

Introduce project connection managers


Introduce parameters

Create a SSIS Catalog


Deploy an Integration Services project to the SSIS Catalog
Execute packages from the SSIS Catalog
Script package execution commands
Monitoring the Integration Services environment and package executions

System Requirements
You must have installed the following items to complete this lab:
Microsoft SQL Server 2012:
Database Engine

Integration Services
SQL Server Management Studio
SQL Server Business Intelligence Development Studio
Adventure Works for SQL Server 2012
AdventureWorksDW2012

Setup
The setup and configuration for this lab involves running a Setup script included with the training kit. To
run all setup tasks for this lab:

Note: This process may require administrative privileges.

1. Open a Windows Explorer window and browse to the labs Source folder.
2. Double-click the Setup.cmd file in this folder to launch the setup script and run all setup tasks
for this lab.
3. If the User Account Control dialog is shown, confirm the action to proceed.

Cleanup
There is no need to cleanup if you intend to continue the sequence of labs in this training kit.
1. To restore the original state of the AdventureWorksDW2012 database, open a Windows
Explorer window and browse to the labs Source\Setup folder.
2. Double-click the Cleanup.cmd file in this folder to launch the cleanup script.
3. If the User Account Control dialog is shown, confirm the action to proceed.

Exercises
This lab comprises the following exercises:
1. Exploring the Integration Services Project
2. Deploying and Managing the Integration Services Project

Estimated time to complete this lab: 30 minutes

Feedback
Your feedback is welcome! Please, post it on our UserVoice forums.
Exercise 1: Exploring the Integration
Services Project
In this exercise, you will explore a partially completed Integration Services project design to populate
the Adventure Works data warehouse. You will explore the design of the packages and specifically the
use of a project connection manager and package parameters.

Task 1 Opening the Integration Services Project


In this task, you will open the AdventureWorksBI solution that contains the Populate DW Integration
Services project.
1. To open Visual Studio 2010, click the Start button, and then select All Programs | Microsoft
Visual Studio 2010 | Microsoft Visual Studio 2010.
2. To open the existing solution, on the File menu, select Open | Project/Solution.
3. In the Open Project window, navigate to the Assets\AdventureWorksBI folder located in the
Source folder for this lab, select the AdventureWorksBI.sln file, and then click Open.

Note: This solution contains a single project that represents a partially completed ETL solution.

4. If the Error List opens, close the list to increase space in the designer window.

Figure 1
Closing the Error List

5. If the AdventureWorksDW2012 database in your environment exists on an instance other than


localhost, in Solution Explorer, in the Connection Managers folder, right-click the
AdventureWorksDW2012.conmgr connection manager, and then select Open. Modify the
Server Name property, and then click OK.

Task 2 Setting the Configurations


In this task, you will explore the QuotaExtracts folder that contains two quota extract files. You will use
a script to create a configuration record to store the path to this folder so that the LoadFactSalesQuota
package can reference the contained files.
1. To open Windows Explorer, right-click the Start button, and then select Open Windows
Explorer.
2. In Windows Explorer, navigate to the Assets\QuotaExtracts folder located in the Source folder
for this lab.
3. Notice the two extract files representing sales quota data for the years 2004 and 2005.
4. To copy the folder path to the clipboard, in the address box, right-click the QuotaExtracts
folder, and then select Copy Address as Text.

Figure 2
Copying the Address

5. To open SQL Server Management Studio, click the Start button, and then select All Programs |
Microsoft SQL Server 2012 | SQL Server Management Studio.
6. If the Connect to Server window does not open, in Object Explorer, click Connect, and then
select Database Engine.
7. In the Connect to Server window, ensure the Server Type dropdown list is set to Database
Engine.
8. In the Server Name box, enter the name of the database engine instance that hosts the
AdventureWorksDW2012 database.
9. Click Connect.
10. To open the script file, on the File menu, select Open | File.
11. In the Open File window, navigate to the \Assets folder located in the Source folder for this lab,
select the InsertConfiguration.sql file, and then click Open.

Note: This script will insert a single row into the etl.Configurations table. This table is a custom
table used to store configuration name/value pairs. Specifically, you will be inserting a row
that defines the folder location for the quota extract files.

12. On the Query menu, select Specify Values for Template Parameters.
13. In the Specify Values for Template Parameters window, right-click inside the Value box, and
then select Paste.

Figure 3
Pasting the Address

14. Click OK.


To execute the script, on the toolbar, click Execute. You should see the same output as the
image below.

Figure 1
Script Results

Task 3 Exploring the Master Package


In this task, you will explore the purpose and design of the Master package.
1. Switch to Visual Studio 2010.
2. In Solution Explorer, right-click the Master.dtsx package, and then select Open.
3. To understand the package purpose, read the comments (in bold) located on the left side of the
control flow design.
4. If necessary, use the zoom control to improve readability of the package design.
Figure 4
Locating the Zoom Control

5. To review the ETLDate package parameter, select the Parameters tab.

Figure 5
Selecting the Parameters Tab

6. Notice that the ETLDate parameter has been configured to be required. This means a valid
value must be passed into the package at execution time.
7. Select the Control Flow tab.
8. To open the Variables window, on the SSIS menu, select Variables.
9. Notice that this package defines a single variable to store the ETLID. The purpose of this variable
is described in the package comments.
10. To close the Variables window, click the Variable windows close button.
11. To understand the package control flow design, read the comments located on the right side of
the control flow design.
12. To review the LoadFactSalesQuota execute package task configuration, right-click the
LoadFactSalesQuota task, and then select Edit.
13. In the Execute Package Task Editor window, select the Package page.

Figure 6
Selecting the Package Page
14. Notice the ReferenceType property is set to Project Reference.

Note: The Project Reference setting is a new feature in SQL Server Code2012 Integration
Services. No longer is there the requirement to create and use connection managers to locate
the package.

15. Select the Parameter Bindings page.


16. Review the parameter binding, and notice that the ETLID generated for the Master package
execution is passed to the child packages ParentETLID parameter. This will enable the child
package to log the executing packages ETLID.
17. Click Cancel.

Task 4 Exploring the LoadFactSalesQuota Package


In this task, you will explore the purpose and the design of the LoadFactSalesQuota package.
1. In Solution Explorer, right-click the LoadFactSalesQuota.dtsx package, and then select Open.
2. To understand the package purpose, read the comments (in bold) located on the left side of the
control flow design.
3. Select the Parameters tab.
4. Notice that the ParentETLID parameter has been configured to be required. This means a valid
value must be passed into the package at execution time. This is achieved through the
parameter bindings of the Execute Package task in the Master package.
5. Select the Control Flow tab.
6. To understand the package control flow design, read the comments located on the right side of
the control flow design.
7. To review the Insert New Quotas Data Flow Task configuration, right-click the Insert New
Quotas task, and then select Edit.
8. To understand the data flow purpose and design, read all of the comments.
9. Notice the Transformations group that allows the package developer to group components
together.

Note: This capability is new in SQL Server 2012 Integration Services. In earlier versions of SQL
Server, this feature was only available for grouping control flow executables (tasks and
containers).
Exercise 2: Deploying and Managing the
Integration Services Project
In this exercise, you will create the SSIS Catalog and then deploy the Populate DW project to this
catalog. Once deployed you will execute the Master package and review the execution results using the
dashboard and standard reports.

Task 1 Creating the SSIS Catalog


In this task, if you do not already have a SSIS Catalog, you will create one. Additionally, you will create
the AdventureWorksBI folder within the catalog.
1. Switch to SQL Server Management Studio.
2. In Object Explorer, expand the Integration Services Catalogs folder.

Figure 7
Expanding the Integration Services Folder

3. If there are no items in the Integration Services Catalogs folder, right-click the Integration
Services Catalogs folder, and then select Create Catalog.
4. In the Create Catalog window, in the Password box, enter Password;1.
5. In the Retype Password box, re-enter the same password, and then click OK.
6. To create a folder in the catalog, right-click SSISDB (beneath the Integration Services Catalogs
folder) and then select Create Folder.
7. In the Create Folder window, in the Folder Name box, enter AdventureWorksBI.
Figure 8
Entering the Folder Name

8. Click OK.
9. In Object Explorer, expand the Databases folder, and notice the SSISDB database.

Note: This database can be used to store deployed projects consisting of packages, connection
managers and various configurations. It is also stores execution and validation messages.
Additionally, it includes an API in the form of stored procedures that can be used by
developers and administrators to perform various tasks, like execute packages.

Task 2 Deploying the Integration Services Project


In this task, you will deploy the Populate DW project to the SSIS Catalog.
1. Switch to Visual Studio 2010.
2. In Solution Explorer, right-click the Populate DW project, and then select Deploy.
3. In the Integration Services Deployment Wizard, click Next.
4. In the Select Source step, notice the default source.

Note: The project deployment option will deploy the project build which is an .ispac file.

5. Click Next.
6. In the Select Destination step, in the Server Name box, if necessary, modify the text to the
name of the instance that hosts the SSIS Catalog.
7. To the right of the Path box, click Browse.
8. In the Browse for Folder or Project window, select the AdventureWorksBI folder.
Figure 9
Selecting the Folder

9. Click OK.
10. Click Next.
11. Click Deploy.
12. When the deployment has succeeded, click Close.

Task 3 Executing the Master Package


In this task, you will execute the Master package three times. The first execution will use the Run
Package window and the ETLDate will be set to 1/1/2004. The second and third package executions will
be run from a script, for the ETLDate values of 1/1/2005 and 1/1/2006. Note that no quota extract file
exists for 2006.
1. Switch to SQL Server Management Studio.
2. In Object Explorer, expand Integration Services Catalogs| SSIDB | AdventureWorksBI |
Projects | Populate DW | Packages.

Figure 10
Expanding to the Project Packages

3. Right-click the Master.dtsx package, and then select Execute.


4. In the Run Package window, notice the error message beneath the window title.
Figure 111
Reviewing the Error Message

5. To set the ETLDate parameter, click the ellipsis.

Figure 12
Locating the Ellipsis

6. In the Edit Literal Value for Execution window, in the Value box, replace the text with
1/1/2004.

Note: Recall that this value will be used to locate the quota extract file.

7. Click OK.
8. Select the Connection Managers tab.
9. Notice that project connection manager property values can be overridden. Do not modify any
of the property values.
10. To execute the package, click OK.
11. In the dialog window, notice the ID for the operation, and then click No.

Note: Each package execution generates a unique operation ID for logging purposes.

12. Use the steps in this task to configure the execution the Master package again, but with an
ETLDate parameter value of 1/1/2005. Do not execute the package.
13. Instead of executing the package immediately, click the Script button, and then select New
Query Editor Window.
Figure 13
Scripting the Package Execution

14. Click Cancel.


15. In the query window, review the T-SQL script used to execute the package, and notice the
assignment of the parameter value.
16. On the toolbar, click Execute.
17. Notice the result returned. The result returned by the script execution represents the operation
ID.
18. In line four of the script, modify the value of 2005 to 2006.

Note: Recall that there is no quota extract file for 2006. This package execution will fail.

Figure 14
Modifying the Parameter Value in the Script

19. Execute the script.

Task 4 Monitoring the Integration Services Environment


In this task, you will review the Integration Services environment. Specifically you will review the failed
package execution and drill through to read messages that describe why the package execution failed.
1. In Object Explorer, right-click SSIDB (the catalog, not the database), and then select Reports |
Standard Reports | Integration Services Dashboard.
2. Notice the Execution Information section detailing one failed and two successful executions.

Figure 15
Reviewing the Execution Information

3. Review the remaining report information.


4. Click the All Messages link available for each operation to review the error messages.

Task 5 Finishing Up
In this task, you will close all open applications.
1. To close SQL Server Management Studio, on the File menu, select Exit.
2. If prompted to save changed items, click No.
3. To close SQL Server Business Intelligence Studio, on the File menu, select Exit.
4. If prompted to save changed items, click No.
5. Close Windows Explorer.

Summary
In this lab, you have explored the Populate DW Integration Services project designed to populate the
Adventure Works data warehouse. You explored the design of the packages and specifically the use of a
project connection manager and package parameters both being new features in Integration Services
for SQL Server 2012
Next you will created the SSIS Catalog and then deployed the Populate DW project to the catalog. Once
deployed you executed the Master package and reviewed the execution results using the dashboard
and standard reports.

You might also like