(Module 5) Lab Taf
(Module 5) Lab Taf
Scenario
You have developed SSIS packages that extract data from various data sources and load it into a staging
database. However, the current solution extracts all source records each time the ETL process is run. This
results in unnecessary processing of records that have already been extracted and consumes a sizeable
amount of network bandwidth to transfer a large volume of data. To resolve this problem, you must modify
the SSIS packages to extract only data that has been added or modified since the previous extraction.
Objectives
After completing this lab, you will be able to:
• Use a datetime column to extract modified rows.
• Use Change Data Capture to extract modified rows.
• Use the CDC Control Task to extract modified rows.
• Use Change Tracking to extract modified rows.
Scenario
The Internet Sales database contains a Customers table that does not include a column to indicate when
records were inserted or modified. You plan to use the Change Data Capture feature of SQL Server Enterprise
Edition to identify records that have changed between data warehouse refresh cycles, and restrict data
extractions to include only modified rows.
The main tasks for this exercise are as follows:
1. Enable Change Data Capture
2. Create a Stored Procedure to Retrieve Modified Rows
3. Use the Stored Procedure in a Data Flow
4. Test the Package
Results: After this exercise, you should have a database in which Change Data Capture has been enabled, and
an SSIS package that uses a stored procedure to extract modified rows based on changes monitored by
Change Data Capture.
Scenario
The HumanResources database contains an Employee table in which employee data is stored. You plan to
use the Change Data Capture feature of SQL Server Enterprise Edition to identify modified rows in this table.
You also plan to use the CDC Control Task in SSIS to manage the extractions from this table by creating a
package to perform the initial extraction of all rows, and a second package that uses the CDC data flow
components to extract rows that have been modified since the previous extraction.
The main tasks for this exercise are as follows:
1. Enable Change Data Capture
5. View Staging Tables
6. Create Connection Managers for CDC Components
7. Create a Package for Initial Data Extraction
8. Test Initial Extraction
9. Create a Package for Incremental Data Extraction
10. Test Incremental Extraction
Results: After this exercise, you should have a HumanResources database in which Change Data Capture has
been enabled, and an SSIS package that uses the CDC Control to extract the initial set of employee records.
You should also have an SSIS package that uses the CDC Control and CDC data flow components to extract
modified employee records based on changes recorded by Change Data Capture.
Results: After this exercise, you should have a database in which Change Tracking has been enabled, and an
SSIS package that uses a stored procedure to extract modified rows based on changes recorded by Change
Tracking.