10777a enu trainerhandbook part4
TRANSCRIPT
-
8/12/2019 10777A ENU TrainerHandbook Part4
1/150
O F F I C I A L M I C R O S O F T L E A R N I N G P R O D U C T
10777AImplementing a Data Warehouse withMicrosoftSQL Server2012
-
8/12/2019 10777A ENU TrainerHandbook Part4
2/150
ii Implementing a Data Warehouse with Microsoft SQL Server 2012
Information in this document, including URL and other Internet Web site references, is subject to change
without notice. Unless otherwise noted, the example companies, organizations, products, domain names,
e-mail addresses, logos, people, places, and events depicted herein are fictitious, and no association with
any real company, organization, product, domain name, e-mail address, logo, person, place or event is
intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the
user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in
or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical,
photocopying, recording, or otherwise), or for any purpose, without the express written permission of
Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property
rights covering subject matter in this document. Except as expressly provided in any written license
agreement from Microsoft, the furnishing of this document does not give you any license to these
patents, trademarks, copyrights, or other intellectual property.
The names of manufacturers, products, or URLs are provided for informational purposes only and
Microsoft makes no representations and warranties, either expressed, implied, or statutory, regarding
these manufacturers or the use of the products with any Microsoft technologies. The inclusion of a
manufacturer or product does not imply endorsement of Microsoft of the manufacturer or product. Links
may be provided to third party sites. Such sites are not under the control of Microsoft and Microsoft is not
responsible for the contents of any linked site or any link contained in a linked site, or any changes or
updates to such sites. Microsoft is not responsible for webcasting or any other form of transmission
received from any linked site. Microsoft is providing these links to you only as a convenience, and the
inclusion of any link does not imply endorsement of Microsoft of the site or the products contained
therein.
2012 Microsoft Corporation. All rights reserved.
Microsoft and the trademarks listed at http://www.microsoft.com/about/legal/en/us/IntellectualProperty
/Trademarks/EN-US.aspx are trademarks of the Microsoft group of companies. All other trademarks are
property of their respective owners.
Product Number: 10777A
Part Number: X18-28026
Released: 05/2012
-
8/12/2019 10777A ENU TrainerHandbook Part4
3/150
MICROSOFT LICENSE TERMSOFFICIAL MICROSOFT LEARNING PRODUCTSMICROSOFT OFFICIAL COURSE Pre-Release and Final Release Versions
These license terms are an agreement between Microsoft Corporation and you. Please read them. They apply tothe Licensed Content named above, which includes the media on which you received it, if any. These license
terms also apply to any updates, supplements, internet based services and support services for the Licensed
Content, unless other terms accompany those items. If so, those terms apply.
BY DOWNLOADING OR USING THE LICENSED CONTENT, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPTTHEM, DO NOT DOWNLOAD OR USE THE LICENSED CONTENT.
If you comply with these license terms, you have the rights below.
1. DEFINITIONS.a. Authorized Learning Center means a Microsoft Learning Competency Member, Microsoft IT Academy
Program Member, or such other entity as Microsoft may designate from time to time.
b. Authorized Training Session means the Microsoft-authorized instructor-led training class using onlyMOC Courses that are conducted by a MCT at or through an Authorized Learning Center.
c. Classroom Device means one (1) dedicated, secure computer that you own or control that meets orexceeds the hardware level specified for the particular MOC Course located at your training facilities or
primary business location.
d. End User means an individual who is (i) duly enrolled for an Authorized Training Session or PrivateTraining Session, (ii) an employee of a MPN Member, or (iii) a Microsoft full-time employee.
e. Licensed Content means the MOC Course and any other content accompanying this agreement.Licensed Content may include (i) Trainer Content, (ii) sample code, and (iii) associated media.
f. Microsoft Certified Trainer or MCT means an individual who is (i) engaged to teach a training sessionto End Users on behalf of an Authorized Learning Center or MPN Member, (ii) currently certified as a
Microsoft Certified Trainer under the Microsoft Certification Program, and (iii) holds a Microsoft
Certification in the technology that is the subject of the training session.
g. Microsoft IT Academy Member means a current, active member of the Microsoft IT AcademyProgram.
h. Microsoft Learning Competency Member means a Microsoft Partner Network Program Member ingood standing that currently holds the Learning Competency status.
i. Microsoft Official Course or MOC Course means the Official Microsoft Learning Product instructor-led courseware that educates IT professionals or developers on Microsoft technologies.
-
8/12/2019 10777A ENU TrainerHandbook Part4
4/150
j. Microsoft Partner Network Member or MPN Member means a silver or gold-level Microsoft PartnerNetwork program member in good standing.
k. Personal Device means one (1) device, workstation or other digital electronic device that youpersonally own or control that meets or exceeds the hardware level specified for the particular MOC
Course.
l.Private Training Sessionmeans the instructor-led training classes provided by MPN Members forcorporate customers to teach a predefined learning objective. These classes are not advertised or
promoted to the general public and class attendance is restricted to individuals employed by or
contracted by the corporate customer.
m. Trainer Content means the trainer version of the MOC Course and additional content designatedsolely for trainers to use to teach a training session using a MOC Course. Trainer Content may include
Microsoft PowerPoint presentations, instructor notes, lab setup guide, demonstration guides, beta
feedback form and trainer preparation guide for the MOC Course. To clarify, Trainer Content does not
include virtual hard disks or virtual machines.
2. INSTALLATION AND USE RIGHTS. The Licensed Content is licensed not sold. The Licensed Content islicensed on a one copy per user basis, such that you must acquire a license for each individual that
accesses or uses the Licensed Content.
2.1 Below are four separate sets of installation and use rights. Only one set of rights apply to you.a. If you are a Authorized Learning Center:
i. If the Licensed Content is in digital format for each license you acquire you may either:1. install one (1) copy of the Licensed Content in the form provided to you on a dedicated, secure
server located on your premises where the Authorized Training Session is held for access and
use by one (1) End User attending the Authorized Training Session, or by one (1) MCT teaching
the Authorized Training Session, or
2. install one (1) copy of the Licensed Content in the form provided to you on one (1) ClassroomDevice for access and use by one (1) End User attending the Authorized Training Session, or by
one (1) MCT teaching the Authorized Training Session.
ii. You agree that:1. you will acquire a license for each End User and MCT that accesses the Licensed Content,2. each End User and MCT will be presented with a copy of this agreement and each individual
will agree that their use of the Licensed Content will be subject to these license terms prior to
their accessing the Licensed Content. Each individual will be required to denote their
acceptance of the EULA in a manner that is enforceable under local law prior to their accessing
the Licensed Content,
3. for all Authorized Training Sessions, you will only use qualified MCTs who hold the applicablecompetency to teach the particular MOC Course that is the subject of the training session,
4. you will not alter or remove any copyright or other protective notices contained in theLicensed Content,
-
8/12/2019 10777A ENU TrainerHandbook Part4
5/150
5. you will remove and irretrievably delete all Licensed Content from all Classroom Devices andservers at the end of the Authorized Training Session,
6. you will only provide access to the Licensed Content to End Users and MCTs,7. you will only provide access to the Trainer Content to MCTs, and8. any Licensed Content installed for use during a training session will be done in accordance
with the applicable classroom set-up guide.
b. If you are a MPN Member.i. If the Licensed Content is in digital format for each license you acquire you may either:
1. install one (1) copy of the Licensed Content in the form provided to you on (A) one (1)Classroom Device, or (B) one (1) dedicated, secure server located at your premises where
the training session is held for use by one (1) of your employees attending a training session
provided by you, or by one (1) MCT that is teaching the training session, or
2. install one (1) copy of the Licensed Content in the form provided to you on one (1)Classroom Device for use by one (1) End User attending a Private Training Session, or one (1)
MCT that is teaching the Private Training Session.
ii. You agree that:1. you will acquire a license for each End User and MCT that accesses the Licensed Content,2. each End User and MCT will be presented with a copy of this agreement and each individual
will agree that their use of the Licensed Content will be subject to these license terms prior
to their accessing the Licensed Content. Each individual will be required to denote their
acceptance of the EULA in a manner that is enforceable under local law prior to their
accessing the Licensed Content,
3. for all training sessions, you will only use qualified MCTs who hold the applicablecompetency to teach the particular MOC Course that is the subject of the training session,
4. you will not alter or remove any copyright or other protective notices contained in theLicensed Content,
5. you will remove and irretrievably delete all Licensed Content from all Classroom Devices andservers at the end of each training session,
6. you will only provide access to the Licensed Content to End Users and MCTs,7. you will only provide access to the Trainer Content to MCTs, and8. any Licensed Content installed for use during a training session will be done in accordance
with the applicable classroom set-up guide.
c. If you are an End User:You may use the Licensed Content solely for your personal training use. If the Licensed Content is in
digital format, for each license you acquire you may (i) install one (1) copy of the Licensed Content in
the form provided to you on one (1) Personal Device and install another copy on another Personal
Device as a backup copy, which may be used only to reinstall the Licensed Content; or (ii) print one (1)
copy of the Licensed Content. You may not install or use a copy of the Licensed Content on a device
you do not own or control.
-
8/12/2019 10777A ENU TrainerHandbook Part4
6/150
d. If you are a MCT.i. For each license you acquire, you may use the Licensed Content solely to prepare and deliver an
Authorized Training Session or Private Training Session. For each license you acquire, you may
install and use one (1) copy of the Licensed Content in the form provided to you on one (1) Personal
Device and install one (1) additional copy on another Personal Device as a backup copy, which may
be used only to reinstall the Licensed Content.You may not install or use a copy of the LicensedContent on a device you do not own or control.
ii. Use of Instructional Components in Trainer Content. You may customize, in accordance with themost recent version of the MCT Agreement, those portions of the Trainer Content that are logically
associated with instruction of a training session. If you elect to exercise the foregoing rights, you
agree: (a) that any of these customizations will only be used for providing a training session, (b) any
customizations will comply with the terms and conditions for Modified Training Sessions and
Supplemental Materials in the most recent version of the MCT agreement and with this agreement.
For clarity, any use of customizerefers only to changing the order of slides and content, and/or
not using all the slides or content, it does not mean changing or modifying any slide or content.
2.2 Separation of Components. The Licensed Content components are licensed as a single unit and youmay not separate the components and install them on different devices.
2.3 Reproduction/Redistribution Licensed Content. Except as expressly provided in the applicableinstallation and use rights above, you may not reproduce or distribute the Licensed Content or any portion
thereof (including any permitted modifications) to any third parties without the express written permission
of Microsoft.
2.4 Third Party Programs. The Licensed Content may contain third party programs or services. Theselicense terms will apply to your use of those third party programs or services, unless other terms accompany
those programs and services.
2.5 Additional Terms. Some Licensed Content may contain components with additional terms,conditions, and licenses regarding its use. Any non-conflicting terms in those conditions and licenses also
apply to that respective component and supplements the terms described in this Agreement.
3. PRE-RELEASE VERSIONS. If the Licensed Content is a pre-release (beta) version, in addition to the otherprovisions in this agreement, then these terms also apply:
a. Pre-Release Licensed Content. This Licensed Content is a pre-release version. It may not contain thesame information and/or work the way a final version of the Licensed Content will. We may change it
for the final version. We also may not release a final version. Microsoft is under no obligation toprovide you with any further content, including the final release version of the Licensed Content.
b. Feedback. If you agree to give feedback about the Licensed Content to Microsoft, either directly orthrough its third party designee, you give to Microsoft without charge, the right to use, share and
commercialize your feedback in any way and for any purpose. You also give to third parties, without
charge, any patent rights needed for their products, technologies and services to use or interface with
any specific parts of a Microsoft software, Microsoft product,or service that includes the feedback. You
will not give feedback that is subject to a license that requires Microsoft to license its software,
technologies, or products to third parties because we include your feedback in them. These rights
-
8/12/2019 10777A ENU TrainerHandbook Part4
7/150
survive this agreement.
c. Term. If you are an Authorized Training Center, MCT or MPN, you agree to cease using all copies of thebeta version of the Licensed Content upon (i) the date which Microsoft informs you is the end date for
using the beta version,or (ii) sixty (60) days after the commercial release of the Licensed Content,
whichever is earliest (beta term). Upon expiration or termination of the beta term, you willirretrievably delete and destroy all copies of same in the possession or under your control.
4. INTERNET-BASED SERVICES. Classroom Devices located at Authorized Learning Centers physical locationmay contain virtual machines and virtual hard disks for use while attending an Authorized Training
Session. You may only use the software on the virtual machines and virtual hard disks on a Classroom
Device solely to perform the virtual lab activities included in the MOC Course while attending the
Authorized Training Session.Microsoft may provide Internet-based services with the software includedwith the virtual machines and virtual hard disks. It may change or cancel them at any time. If the
software is pre-release versions of software, some of its Internet-based services may be turned on by
default. The default setting in these versions of the software do not necessarily reflect how the features
will be configured in the commercially released versions. If Internet-based services are included with the
software, they are typically simulated for demonstration purposes in the software and no transmissionover the Internet takes place. However, should the software be configured to transmit over the Internet,
the following terms apply:
a. Consent for Internet-Based Services. The software features described below connect to Microsoft orservice provider computer systems over the Internet. In some cases, you will not receive a separate
notice when they connect. You may switch off these features or not use them. By using these features,
you consent to the transmission of this information. Microsoft does not use the information to identify
or contact you.
b. Computer Information. The following features use Internet protocols, which send to the appropriatesystems computer information, such as your Internet protocol address, the type of operating system,
browser and name and version of the software you are using, and the language code of the devicewhere you installed the software. Microsoft uses this information to make the Internet-based services
available to you.
Accelerators. When you use click on or move your mouse over an Accelerator, the title and full webaddress or URL of the current webpage, as well as standard computer information, and any content
you have selected, might be sent to the service provider. If you use an Accelerator provided by
Microsoft, the information sent is subject to the Microsoft Online Privacy Statement, which is
available at go.microsoft.com/fwlink/?linkid=31493. If you use an Accelerator provided by a third
party, use of the information sent will be subject to the third partys privacy practices.
Automatic Updates.This software contains an Automatic Update feature that is on by default. Formore information about this feature, including instructions for turning it off, see
go.microsoft.com/fwlink/?LinkId=178857. You may turn off this feature while the software is
running (opt out). Unless you expressly opt out of this feature, this feature will (a) connect to
Microsoft or service provider computer systems over the Internet, (b) use Internet protocols to send
to the appropriate systems standard computer information, such as your computers Internet
protocol address, the type of operating system, browser and name and version of the software you
are using, and the language code of the device where you installed the software, and (c)
automatically download and install, or prompt you to download and/or install, current Updates to
the software. In some cases, you will not receive a separate notice before this feature takes effect.
-
8/12/2019 10777A ENU TrainerHandbook Part4
8/150
By installing the software, you consent to the transmission of standard computer information and
the automatic downloading and installation of updates.
Auto Root Update. The Auto Root Update feature updates the list of trusted certificate authorities.you can switch off the Auto Root Update feature.
Customer Experience Improvement Program (CEIP), Error and Usage Reporting; Error Reports. Thissoftware uses CEIP and Error and Usage Reporting components enabled by default thatautomatically send to Microsoft information about your hardware and how you use this software.
This software also automatically sends error reports to Microsoft that describe which software
components had errors and may also include memory dumps. You may choose not to use these
software components. For more information please go to
.
Digital Certificates. The software uses digital certificates. These digital certificates confirm theidentity of Internet users sending X.509 standard encrypted information. They also can be used to
digitally sign files and macros, to verify the integrity and origin of the file contents. The software
retrieves certificates and updates certificate revocation lists. These security features operate only
when you use the Internet.
Extension Manager. The Extension Manager can retrieve other software through the internet fromthe Visual Studio Gallery website. To provide this other software, the Extension Manager sends to
Microsoft the name and version of the software you are using and language code of the device
where you installed the software. This other software is provided by third parties to Visual Studio
Gallery. It is licensed to users under terms provided by the third parties, not from Microsoft. Read
the Visual Studio Gallery terms of use for more information.
IPv6 Network Address Translation (NAT) Traversal service (Teredo). This feature helps existinghome Internet gateway devices transition to IPv6. IPv6 is a next generation Internet protocol. It
helps enable end-to-end connectivity often needed by peer-to-peer applications. To do so, each
time you start up the software the Teredo client service
will attempt to locate a public TeredoInternet service. It does so by sending a query over the Internet. This query only transfers standard
Domain Name Service information to determine if your computer is connected to the Internet and
can locate a public Teredo service. If you
use an application that needs IPv6 connectivity or
configure your firewall to always enable IPv6 connectivity
by default standard Internet Protocol information will be sent to the Teredo service at Microsoft at
regular intervals. No other information is sent to Microsoft. You can change this default to use non-
Microsoft servers. You can also switch off this feature using a command line utility named netsh.
Malicious Software Removal. During setup, if you select Get important updates for installation,the software may check and remove certain malware from your device. Malware is malicioussoftware. If the software runs, it will remove the Malware listed and updated at
www.support.microsoft.com/?kbid=890830. During a Malware check, a report will be sent to
Microsoft with specific information about Malware detected, errors, and other information about
your device. This information is used to improve the software and other Microsoft products and
services. No information included in these reports will be used to identify or contact you. You may
disable the softwares reporting functionality by following the instructions found at
-
8/12/2019 10777A ENU TrainerHandbook Part4
9/150
www.support.microsoft.com/?kbid=890830. For more information, read the Windows Malicious
Software Removal Tool privacy statement at go.microsoft.com/fwlink/?LinkId=113995.
Microsoft Digital Rights Management. If you use the software to access content that has beenprotected with Microsoft Digital Rights Management (DRM), then, in order to let you play the
content, the software may automatically request media usage rights from a rights server on the
Internet and download and install available DRM updates. For more information, seego.microsoft.com/fwlink/?LinkId=178857.
Microsoft Telemetry Reporting Participation. If you choose to participate in Microsoft TelemetryReporting through a basic or advanced membership, information regarding filtered URLs,
malware and other attacks on your network is sent to Microsoft. This information helps Microsoft
improve the ability of Forefront Threat Management Gateway to identify attack patterns and
mitigate threats. In some cases, personal information may be inadvertently sent, but Microsoft will
not use the information to identify or contact you. You can switch off Telemetry Reporting. For
more information on this feature, see http://go.microsoft.com/fwlink/?LinkId=130980.
Microsoft Update Feature. To help keep the software up-to-date, from time to time, the softwareconnects to Microsoft or service provider computer systems over the Internet. In some cases, youwill not receive a separate notice when they connect. When the software does so, we check your
version of the software and recommend or download updates to your devices. You may not receive
notice when we download the update. You may switch off this feature.
Network Awareness. This feature determines whether a system is connected to a network by eitherpassive monitoring of network traffic or active DNS or HTTP queries. The query only transfers
standard TCP/IP or DNS information for routing purposes. You can switch off the active query
feature through a registry setting.
Plug and Play and Plug and Play Extensions. You may connect new hardware to your device, eitherdirectly or over a network. Your device may not have the drivers needed to communicate with that
hardware. If so, the update feature of the software can obtain the correct driver from Microsoft andinstall it on your device. An administrator can disable this update feature.
Real Simple Syndication (RSS) Feed. This software start page contains updated content that issupplied by means of an RSS feed online from Microsoft.
Search Suggestions Service. When you type a search query in Internet Explorer by using the InstantSearch box or by typing a question mark (?) before your search term in the Address bar, you will see
search suggestions as you type (if supported by your search provider). Everything you type in the
Instant Search box or in the Address bar when preceded by a question mark (?) is sent to your
search provider as you type it. In addition, when you press Enter or click the Search button, all the
text that is in the search box or Address bar is sent to the search provider. If you use a Microsoft
search provider, the information you send is subject to the Microsoft Online Privacy Statement,
which is available at go.microsoft.com/fwlink/?linkid=31493. If you use a third-party search
provider, use of the information sent will be subject to the third partys privacy practices. You can
turn search suggestions off at any time in Internet Explorer by using Manage Add-ons under the
Tools button. For more information about the search suggestions service, see
go.microsoft.com/fwlink/?linkid=128106.
SQL Server Reporting Services Map Report Item. The software may include features that retrievecontent such as maps, images and other data through the Bing Maps (or successor branded)
-
8/12/2019 10777A ENU TrainerHandbook Part4
10/150
application programming interface (the Bing Maps APIs). The purpose of these features is to
create reports displaying data on top of maps, aerial and hybrid imagery. If these features are
included, you may use them to create and view dynamic or static documents. This may be done only
in conjunction with and through methods and means of access integrated in the software. You may
not otherwise copy, store, archive, or create a database of the content available through the Bing
Maps APIs. you may not use the following for any purpose even if they are available through the
Bing Maps APIs:
Bing Maps APIs to provide sensor based guidance/routing, or Any Road Traffic Data or Birds Eye Imagery (or associated metadata).
Your use of the Bing Maps APIs and associated content is also subject to the additional terms and
conditions at http://www.microsoft.com/maps/product/terms.html.
URL Filtering. The URL Filtering feature identifies certain types of web sites based upon predefinedURL categories, and allows you to deny access to such web sites, such as known malicious sites and
sites displaying inappropriate or pornographic materials. To apply URL filtering, Microsoft queries
the online Microsoft Reputation Service for URL categorization. You can switch off URL filtering. For
more information on this feature, see http://go.microsoft.com/fwlink/?LinkId=130980
Web Content Features. Features in the software can retrieve related content from Microsoft andprovide it to you. To provide the content, these features send to Microsoft the type of operating
system, name and version of the software you are using, type of browser and language code of the
device where you run the software. Examples of these features are clip art, templates, online
training, online assistance and Appshelp. You may choose not to use these web content features.
Windows Media Digital Rights Management. Content owners use Windows Media digital rightsmanagement technology (WMDRM) to protect their intellectual property, including copyrights. This
software and third party software use WMDRM to play and copy WMDRM-protected content. If the
software fails to protect the content, content owners may ask Microsoft to revoke the softwares
ability to use WMDRM to play or copy protected content. Revocation does not affect other content.When you download licenses for protected content, you agree that Microsoft may include a
revocation list with the licenses. Content owners may require you to upgrade WMDRM to access
their content. Microsoft software that includes WMDRM will ask for your consent prior to the
upgrade. If you decline an upgrade, you will not be able to access content that requires the upgrade.
You may switch off WMDRM features that access the Internet. When these features are off, you can
still play content for which you have a valid license.
Windows Media Player. When you use Windows Media Player, it checks with Microsoft for compatible online music services in your region;
new versions of the player; and
codecs if your device does not have the correct ones for playing content.
You can switch off this last feature. For more information, go to
www.microsoft.com/windows/windowsmedia/player/11/privacy.aspx.
Windows Rights Management Services. The software contains a feature that allows you to createcontent that cannot be printed, copied or sent to others without your permission. For more
information, go to www.microsoft.com/rms. you may choose not to use this feature
-
8/12/2019 10777A ENU TrainerHandbook Part4
11/150
Windows Time Service. This service synchronizes with time.windows.com once a week to provideyour computer with the correct time. You can turn this feature off or choose your preferred time
source within the Date and Time Control Panel applet. The connection uses standard NTP protocol.
Windows Update Feature. You may connect new hardware to the device where you run thesoftware. Your device may not have the drivers needed to communicate with that hardware. If so,
the update feature of the software can obtain the correct driver from Microsoft and run it on yourdevice. You can switch off this update feature.
c. Use of Information. Microsoft may use the device information, error reports, and malware reports toimprove our software and services. We may also share it with others, such as hardware and software
vendors. They may use the information to improve how their products run with Microsoft software.
d. Misuse of Internet-based Services.You may not use any Internet-based service in any way that couldharm it or impair anyone elses use of it. You may not use the service to try to gain unauthorized access
to any service, data, account or network by any means.
5. SCOPE OF LICENSE. The Licensed Content is licensed, not sold. This agreement only gives you some rightsto use the Licensed Content. Microsoft reserves all other rights. Unless applicable law gives you morerights despite this limitation, you may use the Licensed Content only as expressly permitted in this
agreement. In doing so, you must comply with any technical limitations in the Licensed Content that only
allows you to use it in certain ways. Except as expressly permitted in this agreement, you may not:
install more copies of the Licensed Content on devices than the number of licenses you acquired; allow more individuals to access the Licensed Content than the number of licenses you acquired; publicly display, or make the Licensed Content available for others to access or use; install, sell, publish, transmit, encumber, pledge, lend, copy, adapt, link to, post, rent, lease or lend,
make available or distribute the Licensed Content to any third party, except as expressly permitted
by this Agreement.
reverse engineer, decompile, remove or otherwise thwart any protections or disassemble theLicensed Content except and only to the extent that applicable law expressly permits, despite thislimitation;
access or use any Licensed Content for which you are not providing a training session to End Usersusing the Licensed Content;
access or use any Licensed Content that you have not been authorized by Microsoft to access anduse; or
transfer the Licensed Content, in whole or in part, or assign this agreement to any third party.6. RESERVATION OF RIGHTS AND OWNERSHIP. Microsoft reserves all rights not expressly granted to you in
this agreement. The Licensed Content is protected by copyright and other intellectual property laws and
treaties. Microsoft or its suppliers own the title, copyright, and other intellectual property rights in the
Licensed Content. You may not remove or obscure any copyright, trademark or patent notices that
appear on the Licensed Content or any components thereof, as delivered to you.
7. EXPORT RESTRICTIONS. The Licensed Content is subject to United States export laws and regulations. Youmust comply with all domestic and international export laws and regulations that apply to the Licensed
Content. These laws include restrictions on destinations, End Users and end use. For additional
information, see www.microsoft.com/exporting.
-
8/12/2019 10777A ENU TrainerHandbook Part4
12/150
8. LIMITATIONS ON SALE, RENTAL, ETC. AND CERTAIN ASSIGNMENTS. You may not sell, rent, lease, lend orsublicense the Licensed Content or any portion thereof, or transfer or assign this agreement.
9. SUPPORT SERVICES. Because the Licensed Content is as is, we may not provide support services for it.10. TERMINATION. Without prejudice to any other rights, Microsoft may terminate this agreement if you fail
to comply with the terms and conditions of this agreement. Upon any termination of this agreement, you
agree to immediately stop all use of and to irretrievable delete and destroy all copies of the Licensed
Content in your possession or under your control.
11. LINKS TO THIRD PARTY SITES. You may link to third party sites through the use of the Licensed Content.The third party sites are not under the control of Microsoft, and Microsoft is not responsible for the
contents of any third party sites, any links contained in third party sites, or any changes or updates to third
party sites. Microsoft is not responsible for webcasting or any other form of transmission received from
any third party sites. Microsoft is providing these links to third party sites to you only as a convenience,
and the inclusion of any link does not imply an endorsement by Microsoft of the third party site.
12. ENTIRE AGREEMENT.This agreement, and the terms for supplements, updates and support services arethe entire agreement for the Licensed Content.
13. APPLICABLE LAW.a. United States. If you acquired the Licensed Content in the United States, Washington state law governs
the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws
principles. The laws of the state where you live govern all other claims, including claims under state
consumer protection laws, unfair competition laws, and in tort.
b. Outside the United States. If you acquired the Licensed Content in any other country, the laws of thatcountry apply.
14. LEGAL EFFECT. This agreement describes certain legal rights. You may have other rights under the laws ofyour country. You may also have rights with respect to the party from whom you acquired the Licensed
Content. This agreement does not change your rights under the laws of your country if the laws of your
country do not permit it to do so.
15. DISCLAIMER OF WARRANTY. THE LICENSED CONTENT IS LICENSED "AS-IS," "WITH ALL FAULTS," AND "ASAVAILABLE." YOU BEAR THE RISK OF USING IT. MICROSOFT CORPORATION AND ITS RESPECTIVEAFFILIATES GIVE NO EXPRESS WARRANTIES, GUARANTEES, OR CONDITIONS UNDER OR IN RELATION TOTHE LICENSED CONTENT. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS UNDER YOUR LOCAL LAWSWHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS,MICROSOFT CORPORATION AND ITS RESPECTIVE AFFILIATES EXCLUDE ANY IMPLIED WARRANTIES OR
CONDITIONS, INCLUDING THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ANDNON-INFRINGEMENT.
16. LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. TO THE EXTENT NOT PROHIBITED BYLAW, YOU CAN RECOVER FROM MICROSOFT CORPORATION AND ITS SUPPLIERS ONLY DIRECTDAMAGES UP TO USD$5.00. YOU AGREE NOT TO SEEK TO RECOVER ANY OTHER DAMAGES, INCLUDINGCONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES FROM MICROSOFTCORPORATION AND ITS RESPECTIVE SUPPLIERS.
-
8/12/2019 10777A ENU TrainerHandbook Part4
13/150
This limitation applies to
o anything related to the Licensed Content, services made available through the Licensed Content, orcontent (including code) on third party Internet sites or third-party programs; and
o claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence,or other tort to the extent permitted by applicable law.
It also applies even if Microsoft knew or should have known about the possibility of the damages. The
above limitation or exclusion may not apply to you because your country may not allow the exclusion or
limitation of incidental, consequential or other damages.
Please note: As this Licensed Content is distributed in Quebec, Canada, some of the clauses in this agreementare provided below in French.
Remarque : Cele contenu sous licence tant distribu au Qubec, Canada, certaines des clauses dans cecontrat sont fournies ci-dessous en franais.
EXONRATION DE GARANTIE.Le contenu sous licence vis par une licence est offert tel quel . Touteutilisation de ce contenu sous licence est votre seule risque et pril. Microsoft naccorde aucune autre garantie
expresse. Vous pouvez bnficier de droits additionnels en vertu du droit local sur la protection dues
consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties
implicites de qualit marchande, dadquation un usage particulier et dabsence de contrefaon sont exclues.
LIMITATION DES DOMMAGES-INTRTS ET EXCLUSION DE RESPONSABILIT POUR LES DOMMAGES. Vouspouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement
hauteur de 5,00 $ US. Vous ne pouvez prtendre aucune indemnisation pour les autres dommages, y
compris les dommages spciaux, indirects ou accessoires et pertes de bnfices.
Cette limitation concerne:
tout ce qui est reli au le contenu sous licence , aux services ou au contenu (y compris le code)figurant sur des sites Internet tiers ou dans des programmes tiers ; et les rclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit
stricte, de ngligence ou dune autre faute dans la limite autorise par la loi en vigueur.
Elle sapplique galement, mme si Microsoft connaissait ou devrait connatre lventualit dun tel dommage.
Si votre pays nautorise pas lexclusion ou la limitation de responsabilit pour les dommages indirects,
accessoires ou de quelque nature que ce soit, il se peut que la limitation ou lexclusion ci-dessus ne sappliquera
pas votre gard.
EFFET JURIDIQUE. Le prsent contrat dcrit certains droits juridiques. Vous pourriez avoir dautres droits prvuspar les lois de votre pays. Le prsent contrat ne modifie pas les droits que vous confrent les lois de votre pays
si celles-ci ne le permettent pas.
Revised March 2012
-
8/12/2019 10777A ENU TrainerHandbook Part4
14/150
xiv Implementing a Data Warehouse with Microsoft SQL Server 2012
-
8/12/2019 10777A ENU TrainerHandbook Part4
15/150
Implementing a Data Warehouse with Microsoft SQL Server 2012 xv
AcknowledgmentsMicrosoft Learning would like to acknowledge and thank the following for their contribution towards
developing this title. Their effort at various stages in the development has ensured that you have a good
classroom experience.
Graeme Malcolm Lead Content DeveloperGraeme Malcolm is a Microsoft SQL Server subject matter expert and professional content developer at
Content Mastera division of CM Group Ltd. As a Microsoft Certified Trainer, Graeme has delivered
training courses on SQL Server since version 4.2; as an author, Graeme has written numerous books,
articles, and training courses on SQL Server; and as a consultant, Graeme has designed and implemented
business solutions based on SQL Server for customers all over the world.
Geoff Allix Content Developer
Geoff Allix is a Microsoft SQL Server subject matter expert and professional content developer at Content
Mastera division of CM Group Ltd. Geoff is a Microsoft Certified IT Professional for SQL Server with
extensive experience in designing and implementing database and BI solutions on SQL Server
technologies, and has provided consultancy services to organizations seeking to implement and optimizedata warehousing and OLAP solutions.
Martin Ellis Content Developer
Martin Ellis is a Microsoft SQL Server subject matter expert and professional content developer at Content
Mastera division of CM Group Ltd. Martin is a Microsoft Certified Technical Specialist on SQL Server and
an MCSE. He has been working with SQL Server since version 7.0, as a DBA, consultant and Microsoft
Certified Trainer, and has developed a wide range of technical collateral for Microsoft Corp. and other
technology enterprises.
Chris Testa-ONeill Technical ReviewerChris Testa-ONeil is a Senior Consultant at Coeo (www.coeo.com), a leading provider of SQL Server
Managed Support and Consulting in the UK and Europe. He is also a Microsoft Certified Trainer, Microsoft
Most Valuable Professional for SQL Server, and lead author of Microsoft E-Learning MCTS courses for SQL
Server 2008. Chris has spoken at a range of SQL Server events in the UK, Europe, Australia and the United
States. He is also one of the organizers of SQLBits, SQLServerFAQ and a UK Regional Mentor for SQLPASS.
You can contact Chris at [email protected], @ctesta_oneill or through his blog at
http://www.coeo.com/sql-server-events/sql-events-and-blogs.aspx.
-
8/12/2019 10777A ENU TrainerHandbook Part4
16/150
xvi Implementing a Data Warehouse with Microsoft SQL Server 2012
Contents
Module 1: Introduction to Data Warehousing
Lesson 1: Overview of Data Warehousing 1-3
Lesson 2: Considerations for a Data Warehouse Solution 1-14Lab 1: Exploring a Data Warehousing Solution 1-28
Module 2: Data Warehouse Hardware
Lesson 1: Considerations for Building a Data Warehouse 2-3
Lesson 2: Data Warehouse Reference Architectures and Appliances 2-11
Module 3: Designing and Implementing a Data Warehouse
Lesson 1: Logical Design for a Data Warehouse 3-3
Lesson 2: Physical Design for a Data Warehouse 3-17
Lab 3: Implementing a Data Warehouse Schema 3-27
Module 4: Creating an ETL Solution with SSIS
Lesson 1: Introduction to ETL with SSIS 4-3
Lesson 2: Exploring Source Data 4-10
Lesson 3: Implementing Data Flow 4-21
Lab 4: Implementing Data Flow in an SSIS Package 4-38
Module 5: Implementing Control Flow in an SSIS Package
Lesson 1: Introduction to Control Flow 5-3
Lesson 2: Creating Dynamic Packages 5-14
Lesson 3: Using Containers 5-21
Lab 5A: Implementing Control Flow in an SSIS Package 5-33
Lesson 4: Managing Consistency 5-41
Lab 5B: Using Transactions and Checkpoints 5-51
Module 6: Debugging and Troubleshooting SSIS Packages
Lesson 1: Debugging an SSIS Package 6-3
Lesson 2: Logging SSIS Package Events 6-12
Lesson 3: Handling Errors in an SSIS Package 6-21
Lab 6: Debugging and Troubleshooting an SSIS Package 6-30
Module 7: Implementing an Incremental ETL Process
Lesson 1: Introduction to Incremental ETL 7-3
Lesson 2: Extracting Modified Data 7-9
Lab 7A: Extracting Modified Data 7-31
Lesson 3: Loading Modified Data 7-54
Lab 7B: Loading Incremental Changes 7-73
-
8/12/2019 10777A ENU TrainerHandbook Part4
17/150
Implementing a Data Warehouse with Microsoft SQL Server 2012 xvii
Module 8: Incorporating Data from the Cloud into a Data Warehouse
Lesson 1: Overview of Cloud Data Sources 8-3
Lesson 2: SQL Azure 8-9
Lesson 3: The Windows Azure Marketplace DataMarket 8-19
Lab: Using Cloud Data in a Data Warehouse Solution 8-26
Module 9: Enforcing Data Quality
Lesson 1: Introduction to Data Quality 9-3
Lesson 2: Using Data Quality Services to Cleanse Data 9-13
Lab 9A: Cleansing Data 9-20
Lesson 3: Using Data Quality Services to Match Data 9-29
Lab 9B: Deduplicating Data 9-38
Module 10: Using Master Data Services
Lesson 1: Introduction to Master Data Services 10-3
Lesson 2: Implementing a Master Data Services Model 10-10
Lesson 3: Managing Master Data 10-23
Lesson 4: Creating a Master Data Hub 10-36
Lab 10: Implementing Master Data Services 10-46
Module 11: Extending SQL Server Integration Services
Lesson 1: Using Custom Components in SSIS 11-3
Lesson 2: Using Scripts in SSIS 11-10
Lab 11: Using Custom Components and Scripts 11-21
Module 12: Deploying and Configuring SSIS PackagesLesson 1: Overview of SSIS Deployment 12-3
Lesson 2: Deploying SSIS Projects 12-9
Lesson 3: Planning SSIS Package Execution 12-19
Lab 12: Deploying and Configuring SSIS Packages 12-30
Module 13: Consuming Data in a Data Warehouse
Lesson 1: Introduction to Business Intelligence 13-3
Lesson 2: Introduction to Reporting 13-8
Lesson 3: Introduction to Data Analysis 13-12
Lab 13: Using Business Intelligence Tools 13-18
-
8/12/2019 10777A ENU TrainerHandbook Part4
18/150
xviii Implementing a Data Warehouse with Microsoft SQL Server 2012
Appendix: Lab Answer Keys
Module 1 Lab 1:Exploring a Data Warehousing Solution L1-1
Module 3 Lab 3:Implementing a Data Warehouse Schema L3-7
Module 4 Lab 4:Implementing Data Flow in an SSIS Package L4-13
Module 5 Lab 5A:Implementing Control Flow in an SSIS Package L5-25
Module 5 Lab 5B:Using Transactions and Checkpoints L5-33
Module 6 Lab 6:Debugging and Troubleshooting an SSIS Package L6-37
Module 7 Lab 7A:Extracting Modified Data L7-45
Module 7 Lab 7B:Loading Incremental Changes L7-65
Module 8 Lab 8:Using Cloud Data in a Data Warehouse Solution L8-81
Module 9 Lab 9A:Cleansing Data L9-91
Module 9 Lab 9B:Deduplicating Data L9-99
Module 10 Lab 10:Implementing Master Data Services L10-105
Module 11 Lab 11:Using Custom Components and Scripts L11-117
Module 12 Lab 12:Deploying and Configuring SSIS Packages L12-123
Module 13 Lab 13:Using Business Intelligence Tools L13-129
-
8/12/2019 10777A ENU TrainerHandbook Part4
19/150
L1-1
Module 1: Introduction to Data Warehousing
Lab 1: Exploring a Data WarehousingSolution
Exercise 1: Exploring Data Sources
Task 1: Prepare the lab environment1. Ensure that the MIA-DC1 and MIA-SQLBI virtual machines are both running, and then log on to
MIA-SQLBI as ADVENTUREWORKS\Studentwith the password Pa$$w0rd.
2. Click Start, and then click Computer.3. Double-click Local Disk (D:), double-click 10777A, double-click Labfiles, double-click Lab01, and
then double-click Starterto view the contents of the D:\10777A\Labfiles\Lab01\Starter folder.
4. Right-click the SetupWindows Command Script file (Setup.cmd), and then click Run asadministrator.
5. Click Yeswhen prompted to confirm that you want to run the command file, and then wait for thescript to finish.
Task 2: View the solution architecture1. In the D:\10777A\Labfiles\Lab01\Starter folder, double-click the Adventure Works DW Solution.jpg
JPEG image to open it in Paint.
2. Examine the diagram, and note that it shows several data sources on the left, which provide thesource data for the data warehouse. You will examine these data sources in the rest of this exercise.
Note In addition to the data sources that you will examine in this lab, the diagram
includes a Microsoft SQL Server Master Data Services model for product data, a SQLServer Data Quality Services task to cleanse data as it is staged, and cloud data sources.
These elements form part of the complete solution for the lab scenario in this course, but
they are not present in this lab.
3. Minimize Paint. You will return to it in the next exercise. Task 3: View the Internet Sales data source1. In the D:\10777A\Labfiles\Lab01\Starter folder, double-click the View Internet Sales.sqlSQL Server
query file. This starts Microsoft SQL Server Management Studio.
2. When prompted, in the Server namebox, type localhost, in the Authenticationdrop-down list,click Windows Authentication, and click Connect. When a second prompt is displayed, clickConnectagain to connect to the localhostserver in the Object Explorer pane.
3. Click anywhere in the main query window, and then click Executeon the toolbar to run the query.When the query completes, review the results and note that this data source contains data about
customers and the orders that they have placed through the Adventure Works e-commerce website.
4. Keep SQL Server Management Studio open for the next task.
-
8/12/2019 10777A ENU TrainerHandbook Part4
20/150
L1-2 Module 1: Introduction to Data Warehousing
Task 4: View the Reseller Sales data source1. In SQL Server Management Studio, on the Filemenu, click Open, and then click File.2. In the Open Filedialog box, navigate to the D:\10777A\Labfiles\Lab01\Starter folder, and then
double-click the View Reseller Sales.sqlSQL Server query file.
3.
Click anywhere in the main query window, and then click Executeon the toolbar to run the query.When the query completes, review the results and note that this data source contains data about
resellers and the orders that they have placed through Adventure Works reseller account managers.
4. Keep SQL Server Management Studio open for the next task. Task 5: View the Products data source1. In SQL Server Management Studio, on the Filemenu, click Open, and then click File.2. In the Open Filedialog box, navigate to the D:\10777A\Labfiles\Lab01\Starter folder, and then
double-click the View Products.sqlMicrosoft SQL Server query file.
3. Click anywhere in the main query window, and then click Executeon the toolbar to run the query.When the query completes, review the results and note that this data source contains data about
products that Adventure Works sells, and that products are organized into categories and
subcategories.
4. Keep SQL Server Management Studio open for the next task. Task 6: View the Human Resources data source1. In SQL Server Management Studio, on the Filemenu, click Open, and then click File.2. In the Open Filedialog box, navigate to the D:\10777A\Labfiles\Lab01\Starter folder, and then
double-click the View Employees.sqlMicrosoft SQL Server query file.
3. Click anywhere in the main query window, and then click Executeon the toolbar to run the query.When the query completes, review the results and note that this data source contains data about
employees, including the sales representatives associated with reseller sales.
4. Minimize SQL Server Management Studio. You will return to it later in this exercise. Task 7: View the Accounts data source1. View the contents of the D:\10777A\Accounts folder. This folder contains several comma-delimited
text files.
2. Double-click the Payments AUfile to open it in Microsoft Excel.3. Review the contents of the file and note that it contains data about reseller payments that the
Adventure Works accounting system has processed. Each file in the Accounts folder relates to
payments that resellers have made in a specific country.
4. Close Excel without saving any changes.
-
8/12/2019 10777A ENU TrainerHandbook Part4
21/150
Lab 1: Exploring a Data Warehousing Solution L1-3
Task 8: View the Regional Account Managers data source1. Click Start, and then click Internet Explorerto open a new instance of the browser. The browser
should open the default home page at http://mia-sqlbi/SitePages/Home.aspx. If it does not, navigate
to http://mia-sqlbi.
2. In the Quick Launch menu on the left of the home page, under Lists, click Regional AccountManagers.
3. Review the list and note that it contains data about reseller account managers for variousgeographical regions.
4. Close Internet Explorer. Task 9: View the staging database1. Restore SQL Server Management Studio.2. In the Object Explorer pane, expand Databases, expand Staging, and then expand Tables.3. Right-click the dbo.AccountManagerstable, and then click Select Top 1000 Rows. When the query
completes, note that this table is empty.
4. Repeat the previous step to verify that the dbo.Customers, dbo.EmployeeDeletes,dbo.EmployeeInserts, dbo.EmployeeUpdates, dbo.InternetSales, dbo.Payments, dbo.Resellers,
and dbo.ResellerSalestables are also empty.
Note The dbo.ExtractLogtable contains data that is used to track data extractions fromthe Internet Sales and Reseller Sales data sources.
5. Minimize SQL Server Management Studio. You will return to it in the next exercise.
-
8/12/2019 10777A ENU TrainerHandbook Part4
22/150
L1-4 Module 1: Introduction to Data Warehousing
Exercise 2: Exploring an ETL Process
Task 1: View the solution architecture1. Maximize Paint and view the solution architecture diagram.2. Note that the extract, transform, and load (ETL) solution consists of two main phases: a process to
extract data from the various data sources and load it into a staging database, and a process to loadthe data in the staging database into the data warehouse. In this exercise, you will observe these ETL
processes as they run.
3. Minimize Paint. You will return to it in the next exercise. Task 2: Run the ETL staging process1. View the contents of the D:\10777A\Labfiles\Lab01\Starter folder, and then double-click
AdventureWorksETL.sln. The solution opens in SQL Server Data Tools (which is labeled Visual
Studio).
2. If the Solution Explorer pane is not visible, on the Viewmenu, click Solution Explorer.If necessary, click the pin icon to freeze it in position.
3. In the Solution Explorer pane, in the SSIS Packages folder, double-click Stage Data.dtsxto open it inthe Designer pane. Note that the staging process consists of six tasks:
Stage Internet Sales Stage Reseller Sales Stage Payments Stage Regional Account managers Stage Employees Notify Completion
4. On the Debugmenu, click Start Debugging, and then observe that the staging process runs a SQLServer Integration Services package for each of the tasks.
5. When the message Staging process completeis displayed, click OK, and then on the Debugmenu,click Stop Debugging.
Note The message box may be hidden by the SQL Server Data Tools window. Look for anew icon on the taskbar, and then click it to bring the message box to the front.
6. Minimize SQL Server Data Tools (which is labeled Visual Studio). You will return to it later in thisexercise.
-
8/12/2019 10777A ENU TrainerHandbook Part4
23/150
Lab 1: Exploring a Data Warehousing Solution L1-5
Task 3: View the staged data1. Restore SQL Server Management Studio.2. If necessary, in the Object Explorer pane, expand Databases, expand Staging, and then expand
Tables.
3.
Right-click the dbo.AccountManagerstable, and then click Select Top 1000 Rows. When the querycompletes, note that this table now contains data that the ETL process has extracted from the data
source.
4. Repeat the previous step to verify that the dbo.Customers, dbo.EmployeeInserts,dbo.InternetSales, dbo.Payments, dbo.Resellers, and dbo.ResellerSalestables also contain staged
data.
5. Minimize SQL Server Management Studio. You will return to it later in this exercise. Task 4: Run the ETL data warehouse load process1. Restore SQL Server Data Tools (which is labeled Visual Studio).2. If necessary, display the Solution Explorer pane.3. In the Solution Explorer pane, in the SSIS Packages folder, double-click Load DW.dtsxto open it in
the Designer pane. Note that the data warehouse loading process consists of a sequence of tasks to
load various dimensions and facts, followed by a task to determine the number of records loaded
from each staging table before truncating the staging tables, and a task to log the rowcounts.
4. On the Debugmenu, click Start Debugging, and then observe that the data warehouse loadingprocess runs an SSIS package for the dimension or fact table to be loaded. The process may take
several minutes to complete.
5. When the message Data warehouse load completeis displayed, click OK, and then on the Debugmenu, click Stop Debugging.
Note The message box may be hidden by the SQL Server Data Tools window. Look for anew icon on the taskbar, and then click it to bring the message box to the front.
6. Close SQL Server Data Tools (which is labeled Visual Studio).
-
8/12/2019 10777A ENU TrainerHandbook Part4
24/150
L1-6 Module 1: Introduction to Data Warehousing
Exercise 3: Exploring a Data Warehouse
Task 1: View the solution architecture1. Maximize Paint and view the solution architecture diagram.2. Note that the data warehouse provides a central source of data for business reporting and analysis.3. Close Paint. Task 2: Query the data warehouse1. Restore SQL Server Management Studio.2. In SQL Server Management Studio, on the Filemenu, click Open, and then click File.3. In the Open Filedialog box, navigate to the D:\10777A\Labfiles\Lab01\Starter folder, and then
double-click the Query DW.sqlMicrosoft SQL Server query file.
4. Click anywhere in the main query window, and then click Executeon the toolbar to run the query.When the query completes, review the results and note that the query uses the data warehouse to
retrieve:
Total sales for each country by fiscal year Total units sold for each product category by calendar year
5. Close SQL Server Management Studio without saving any changes.
-
8/12/2019 10777A ENU TrainerHandbook Part4
25/150
L3-7
Module 3: Designing and Implementing a Data Warehouse
Lab 3: Implementing a Data WarehouseSchema
Exercise 1: Implementing a Star Schema
Task 1: Prepare the lab environment1. Ensure that the MIA-DC1 and MIA-SQLBI virtual machines are both running, and then log on to
MIA-SQLBI as ADVENTUREWORKS\Studentwith the password Pa$$w0rd.
2. Click Start, and then click Computer.3. Double-click Local Disk (D:), double-click 10777A, double-click Labfiles, double-click Lab03, and
then double-click Starterto view the contents of the D:\10777A\Labfiles\Lab03\Starter folder.
4. Right-click the SetupWindows Command Script file (Setup.cmd), and then click Run asadministrator.
5. Click Yeswhen prompted to confirm that you want to run the command file, and then wait for thescript to finish.
Task 2: View the AWDataWarehouse database1. Click Start, click All Programs, click Microsoft SQL Server 2012, and then click SQL Server
Management Studio.
2. When prompted, connect to the localhostdatabase engine by using Windows authentication.3. In Object Explorer, expand Databases, expand AWDataWarehouse, and then expand Tables. Note
that the database contains four tables.
4. Right-click the Database Diagramsfolder, and then click New Database Diagram. If you areprompted to create the required support objects, click Yes.5. In the Add Tabledialog box, click each table while holding down the Ctrl key to select them all, click
Add, and then click Close.
6. In the database diagram, click each table while holding down the Ctrl key to select them all.7. On the toolbar, in the Table Viewdrop-down list, click Standard.8. Arrange the tables and adjust the zoom level so that you can see the entire database schema, and
then examine the tables, noting the columns that they contain.
Note that the FactResellerSalestable contains foreign-key columns that relate it to the DimReseller,
DimEmployee, and DimProducttables. It also contains some numerical measures that can be
aggregated to provide useful business information, such as the total sales amount per reseller or the
total quantity of units sold per product.
-
8/12/2019 10777A ENU TrainerHandbook Part4
26/150
L3-8 Module 3: Designing and Implementing a Data Warehouse
Task 3: Create a dimension table for customers1. In Microsoft SQL Server Management Studio, on the Filemenu, point to Open, and then click
File.
2. Browse to the D:\10777A\Labfiles\Lab03\Starter folder, click the DimCustomer.sqlTransact-SQLquery file, and then click Open.
3. Review the Transact-SQL code, noting that it creates a table named DimCustomerin theAWDataWarehousedatabase, and then click Execute.
Task 4: Create a fact table for Internet sales1. In SQL Server Management Studio, on the Filemenu, point to Open, and then click File.2. Browse to the D:\10777A\Labfiles\Lab03\Starter folder, click the FactInternetSales.sqlTransact-SQL
query file, and then click Open.
3. Review the Transact-SQL code, noting that it creates a table named FactInternetSalesin theAWDataWarehousedatabase, and that this table is related to the DimCustomerand DimProduct
tables.
4. Click Execute. Task 5: View the database schema1. In SQL Server Management Studio, view the database diagram window that you opened in Task 2.2. On the Database Diagrammenu, click Add Table.3. In the Add Tabledialog box, click Refresh, select the DimCustomerand FactInternetSalestables,
click Add, and then click Close.
4. Select each of the new tables and then on the toolbar, in the Table Viewdrop-down list, clickStandard.
5. Arrange the tables and adjust the zoom level so that you can see the entire database schema.6. On the Filemenu, click Save Diagram_0, enter the name AWDataWarehouse Schema, and then
click OK.
7. Keep SQL Server Management Studio open. You will return to it in the next exercise.
-
8/12/2019 10777A ENU TrainerHandbook Part4
27/150
Lab 3: Implementing a Data Warehouse Schema L3-9
Exercise 2: Implementing a Snowflake Schema
Task 1: Create product category and product subcategory dimension tables1. In SQL Server Management Studio, on the Filemenu, point to Open, and then click File.2. Browse to the D:\10777A\Labfiles\Lab03\Starter folder, click the DimProductCategory.sql
Transact-SQL query file, and then click Open.
3. Review the Transact-SQL code, noting that it: Creates a table named DimProductCategory. Creates a table named DimProductSubcategorythat has a foreign-key relationship to the
DimProductCategorytable.
Drops the ProductSubcategoryNameand ProductCategoryNamecolumns from theDimProducttable.
Adds a ProductSubcategoryKeycolumn to the DimProducttable that has a foreign-keyrelationship to the DimProductSubcategorytable.
4. Click Execute. Task 2: Create a geography dimension table1. In SQL Server Management Studio, on the Filemenu, point to Open, and then click File.2. Browse to the D:\10777A\Labfiles\Lab03\Starter folder, click the DimGeography.sqlTransact-SQL
query file, and then click Open.
3. Review the Transact-SQL code, noting that it: Creates a table named DimGeography. Drops the City, StateProvinceName, CountryRegionCode, CountryRegionName, and
PostalCodecolumns from the DimResellertable.
Adds a GeographyKeycolumn to the DimResellertable that has a foreign-key relationship tothe DimGeographytable.
Drops the City, StateProvinceName, CountryRegionCode, CountryRegionName, andPostalCodecolumns from the DimCustomertable.
Adds a GeographyKeycolumn to the DimCustomertable that has a foreign-key relationship tothe DimGeographytable.
4. Click Execute.
-
8/12/2019 10777A ENU TrainerHandbook Part4
28/150
L3-10 Module 3: Designing and Implementing a Data Warehouse
Task 3: View the database schema1. In SQL Server Management Studio, view the database diagram window that you opened in Exercise 1,
Task 2.
2. Select the DimProduct, DimReseller, and DimCustomertables, and then press Delete to removethem from the diagram (this does not drop the tables from the database).
3. On the Database Diagrammenu, click Add Table.4. In the Add Tabledialog box, click Refresh, select the DimCustomer,DimGeography, DimProduct,
DimProductCategory, DimProductSubcategory, and DimResellertables, and click Add. If you are
prompted to update the diagram, click OK. Then click Close.
5. Select each of the new tables and then on the toolbar, in the Table Viewdrop-down list, clickStandard.
6. Arrange the tables and adjust the zoom level so that you can see the entire database schema.7. Keep SQL Server Management Studio open. You will return to it in the next exercise.
-
8/12/2019 10777A ENU TrainerHandbook Part4
29/150
Lab 3: Implementing a Data Warehouse Schema L3-11
Exercise 3: Implementing a Time Dimension Table
Task 1: Create a time dimension table1. In SQL Server Management Studio, on the Filemenu, point to Open, and then click File.2. Browse to the D:\10777A\Labfiles\Lab03\Starter folder, click the DimDate.sqlTransact-SQL query file,
and then click Open.
3. Review the Transact-SQL code, noting that it: Creates a table named DimDate. Adds OrderDateKeyand ShipDateKeycolumns to the FactInternetSalesand FactResellerSales
tables that have foreign-key relationships to the DimDate table.
Creates indexes on the OrderDateKey andShipDateKeyforeign-key fields in theFactInternetSalesand FactResellerSalestables.
4. Click Execute. Task 2: View the database schema1. In SQL Server Management Studio, view the database diagram window that you opened in Exercise 1,
Task 2.
2. Select the FactResellerSalesand FactInternetSalestables, and then press Delete to remove themfrom the diagram (this does not drop the tables from the database).
3. On the Database Diagrammenu, click Add Table.4. In the Add Tabledialog box, click Refresh, select the DimDate, FactInternetSales, and
FactResellerSalestables, and click Add. If you are prompted to save changes to the database, click
OK. Then click Close.
5. Select the new tables and then on the toolbar, in the Table Viewdrop-down list, click Standard.6. Arrange the tables and adjust the zoom level so that you can see the entire database schema. Task 3: Populate the time dimension table1. In SQL Server Management Studio, on the Filemenu, point to Open, and then click File.2. Browse to the D:\10777A\Labfiles\Lab03\Starter folder, click the GenerateDates.sqlTransact-SQL
query file, and then click Open.
3. Review the Transact-SQL code, noting that it: Declares a variable named @StartDatewith the value 1/1/2000, and a variable named
@EndDatewith the value of the current date.
Performs a loop to insert appropriate values for each date between @StartDateand @EndDateinto the DimDatetable.
4. Click Execute.
-
8/12/2019 10777A ENU TrainerHandbook Part4
30/150
L3-12 Module 3: Designing and Implementing a Data Warehouse
Task 4: View the time dimension data1. In SQL Server Management Studio, in Object Explorer, right-click the Tablesfolder for the
AWDataWarehousedatabase, and then click Refresh.
2. Right-click the DimDatetable, and then click Select Top 1000 Rows.3.
View the data in the table, noting that it contains appropriate values for each date.
4. Close SQL Server Management Studio, saving changes if you are prompted.
-
8/12/2019 10777A ENU TrainerHandbook Part4
31/150
L4-13
Module 4: Creating an ETL Solution with SSIS
Lab 4: Implementing Data Flow in an SSISPackage
Exercise 1: Exploring Source Data
Task 1: Prepare the lab environment1. Ensure that the MIA-DC1 and MIA-SQLBI virtual machines are both running, and then log on to
MIA-SQLBI as ADVENTUREWORKS\Studentwith the password Pa$$w0rd.
2. Click Start, and then click Computer.3. Double-click Local Disk (D:), double-click 10777A, double-click Labfiles, double-click Lab04, and
then double-click Starterto view the contents of the D:\10777A\Labfiles\Lab04\Starter folder.
4. Right-click the SetupWindows Command Script file (Setup.cmd), and then click Run asadministrator.
5. Click Yeswhen prompted to confirm that you want to run the command file, and then wait for thescript to finish.
Task 2: Extract and view sample source data1. Click Start, click All Programs, click Microsoft SQL Server 2012, and then click Import and Export
Data (64-bit).
2. On the Welcome to SQL Server Import and Export Wizardpage, click Next.3. On the Choose a Data Sourcepage, select the following options, and then click Next:
Data source: SQL Server Native Client 11.0 Server name: (local) Authentication: Use Windows Authentication Database: InternetSales
4. On the Choose a Destinationpage, select the following options, and then click Next: Data destination: Flat File Destination File name: D:\10777A\Labfiles\Lab04\Starter\Top 1000 Customers.csv Locale: English (United States) Unicode: Unselected Code page: 1252 (ANSI Latin 1) Format: Delimited Text qualifier: " (a quotation mark) Column names in the first data row: SelectedNote The text qualifier is used to enclose text values in the exported data. This is requiredbecause some European address formats include a comma, and these must be distinguished
from the commas that are used to separate each column value in the exported text file.
-
8/12/2019 10777A ENU TrainerHandbook Part4
32/150
L4-14 Module 4: Creating an ETL Solution with SSIS
5. On the Specify Table Copy or Querypage, select Write a query to specify the data to transfer,and then click Next.
6. On the Provide a Source Querypage, enter the following Transact-SQL code, and then click Next.SELECT TOP 1000 * FROM Customers
7. On the Configure Flat File Destinationpage, select the following options, and then click Next: Source query: Query Row delimiter: {CR}{LF} Column delimiter: Comma {,}
8. On the Save and Run Packagepage, select only Run immediately, and then click Next.9. On the Complete the Wizardpage, click Finish.10. When the data extraction has completed successfully, click Close.11. Click Start, click Computer, double-click Local Disk (D:), double-click 10777A, double-click Labfiles,
double-click Lab04, and then double-click Starterto view the contents of theD:\10777A\Labfiles\Lab04\Starter folder.
12. Double-click the Top 1000 Customers.csvfile to open it in Microsoft Excel.13. Examine the data, noting the columns that exist in the Customerstable and the range of data values
that they contain, and then close Excel without saving any changes.
Note You may observe some anomalies in the data, such as invalid gender codes andmultiple values for the same country or region. The purpose of examining the source data is
to identify as many of these problems as possible, so that you can resolve them in the
development of the extract, transform, and load (ETL) solution. You will address the
problems in this data in later labs.
Task 3: Profile source data1. Click Start, click All Programs, click Microsoft SQL Server 2012, and then click SQL Server Data
Tools.
2. On the Filemenu, point to New, and then click Project.3. In the New Projectdialog box, select the following values, and then click OK:
Project Template: Integration Services Project Name: Explore Internet Sales Location: D:\10777A\Labfiles\Lab04\Starter Create directory for solution: Selected Solution name:Ex1
4. In the Solution Explorer pane, right-click Connection Managers, and then click New ConnectionManager.
5. In the Add SSIS Connection Managerdialog box, click ADO.NET, and then click Add.
-
8/12/2019 10777A ENU TrainerHandbook Part4
33/150
Lab 4: Implementing Data Flow in an SSIS Package L4-15
6. In the Configure ADO.NET Connection Managerdialog box, click New.7. In the Connection Managerdialog box, enter the following values, and then click OK:
Server name: localhost Log on to the server: Use Windows Authentication Select or enter a database name: InternetSales
8. In the Configure ADO.NET Connection Managerdialog box, verify that a data connection namedlocalhost.InternetSalesis listed, and then click OK.
9. In the SSIS Toolbox pane, in the Commonsection, double-click Data Profiling Taskto add it to theControl Flow surface. (Alternatively, you can drag the task icon to the Control Flow surface.)
Note If the SSIS Toolbox pane is not visible, on the SSISmenu, click SSIS Toolbox.
10. Double-click the Data Profiling Taskicon on the Control Flow surface to open its editor.11. In the Data Profiling Task Editordialog box, on the Generaltab, in the Destinationproperty value
drop-down list, click .
12. In the File Connection Manager Editordialog box, in the Usage typedrop-down list, click Createfile.
13. In the Filebox, type D:\10777A\ETL\Internet Sales Data Profile.xml, and then click OK.14. In the Data Profiling Task Editordialog box, on the Profile Requeststab, in the Profile Typedrop-
down list, select Column Statistics Profile Request, and then click the RequestIDcolumn.
15. In the Request Properties pane, set the following property values. Do notclick OKwhen finished: ConnectionManager: localhost.InternetSales TableOrView: [dbo].[SalesOrderHeader] Column: OrderDate
16. In the Data Profiling Task Editordialog box, on the Profile Requeststab, in the Profile Typedrop-down list, select Column Length Distribution Profile Request, and then click the RequestID
column.
17. In the Request Properties pane, set the following property values. Do notclick OKwhen finished: ConnectionManager: localhost.InternetSales TableOrView: [dbo].[Customers] Column: AddressLine1 IgnoreLeadingSpaces: False IgnoreTrailingSpaces: True
18. In the Data Profiling Task Editordialog box, on the Profile Requeststab, in the Profile Typedrop-down list, select Column Null Ratio Profile Request, and then click the RequestIDcolumn.
-
8/12/2019 10777A ENU TrainerHandbook Part4
34/150
L4-16 Module 4: Creating an ETL Solution with SSIS
19. In the Request Properties pane, set the following property values. Do notclick OKwhen finished: ConnectionManager: localhost.InternetSales TableOrView: [dbo].[Customers] Column: AddressLine2
20. In the Data Profiling Task Editordialog box, on the Profile Requeststab, in the Profile Typedrop-down list, select Value Inclusion Profile Request, and then click the RequestIDcolumn.
21. In the Request Properties pane, set the following property values: ConnectionManager: localhost.InternetSales SubsetTableOrView: [dbo].[SalesOrderHeader] SupersetTableOrView: [dbo].[PaymentTypes] InclusionColumns:
Subset side Columns: PaymentType
Superset side Columns: PaymentTypeKey InclusionThresholdSetting: None SupersetColumnsKeyThresholdSetting: None MaxNumberOfViolations: 100
22. In the Data Profiling Task Editordialog box, click OK.23. On the Debugmenu, click Start Debugging.24. When the Data Profiling task has completed, with the package still running, double-click the Data
Profiling task, and then click Open Profile Viewer.
25. Maximize the Data Profile Viewer window, and under the[dbo].[SalesOrderHeader]table, clickColumn Statistics Profiles. Then review the minimum and maximum values for the OrderDatecolumn.
26. Under the[dbo].[Customers]table, click Column Length Distribution Profilesand click theAddressLine1column to view the statistics. Click the bar chart for any of the column lengths, and
then click the Drill Downbutton to view the source data that matches the selected column length.
27. Under the[dbo].[Customers]table, click Column Null Ratio Profilesand view the null statistics forthe AddressLine2column. Select the AddressLine2column, and then click the Drill Downbutton to
view the source data.
28. Under the[dbo].[ SalesOrderHeader]table, click Inclusion Profilesand review the inclusionstatistics for the PaymentTypecolumn. Select the inclusion violation for the payment type value of 0,
and then click the Drill Downbutton to view the source data.29. Close the Data Profile Viewer window, and then in the Data Profiling Task Editordialog box, click
Cancel.
30. On the Debugmenu, click Stop Debugging.31. Close Microsoft Visual Studio, saving your changes if you are prompted.
-
8/12/2019 10777A ENU TrainerHandbook Part4
35/150
Lab 4: Implementing Data Flow in an SSIS Package L4-17
Exercise 2: Transferring Data by Using a Data Flow Task
Task 1: Examine an existing data flow1. View the contents of the D:\10777A\Labfiles\Lab04\Starter folder, and then double-click Ex2to view
the contents of the Ex2 folder.
2. Double-click the AdventureWorksETL.slnVisual Studio solution file to open it in Visual Studio.3. In the Solution Explorer pane, double-click the Extract Reseller Data.dtsxpackage to open it in the
designer.
4. On the Control Flow surface, note that the package contains two Data Flow tasks.5. Double-click the Extract ResellersData Flow task to view it on the Data Flowtab and note that it
contains a data source named Resellersand a data destination named Staging DB.
6. Double-click the Resellersdata source, note the following details, and then click Cancel: On the Connection Managerpage, the data source is configured to use an OLE DB connection
manager named localhost.ResellerSalesand extracts data from the [dbo].[Resellers]table.
On the Columnstab, the data source is configured to retrieve every column from the Resellerstable, and the output columns that the task generates have the same names as the source
columns.
7. Double-click the Staging DBdata destination, note the following details, and then click Cancel: On the Connection Managerpage, the data destination is configured to use an OLE DB
connection manager named localhost.Stagingand to use a Table or view - fast loadaccess
mode to insert data into the [dbo].[Resellers]table.
On the Mappingstab, the data destination is configured to map the input columns (which arethe output columns from the Resellersdata source) to columns in the destination table. The
order of the columns in the destination is different from the column order in the source, and the
source ResellerKeycolumn is mapped to the ResellerBusinessKeydestination column.8. Right-click anywhere on the Data Flow surface, click Execute Task, and then observe the task as it
runs, noting how many rows are transferred.
9. On the Debugmenu, click Stop Debugging. Task 2: Create a Data Flow task1. In the Solution Explorer pane, right-click SSIS Packages, and then click New SSIS Package.2. Right-click Package1.dtsx, click Rename, and then change the name of the package to Extract
Internet Sales Data.dtsx.
3. With the Extract Internet Sales Data.dtsx package open, and the Control Flow surface visible, in theSSIS Toolbox pane, double-click Data Flow Task, and then drag the new Data Flow task to the centerof the Control Flow surface.
4. Right-click the Data Flow task on the Control Flow surface, click Rename, and then change the nameof the task to Extract Customers.
5. Double-click the Extract CustomersData Flow task to view the Data Flow surface.
-
8/12/2019 10777A ENU TrainerHandbook Part4
36/150
L4-18 Module 4: Creating an ETL Solution with SSIS
Task 3: Add a data source to a data flow1. In the Solution Explorer pane, right-click Connection Managers, and then click New Connection
Manager.
2. In the Add SSIS Connection Managerdialog box, click OLEDB, and then click Add.3.
In the Configure OLE DB Connection Managerdialog box, click New.
4. In the Connection Managerdialog box, enter the following values, and then click OK: Server name: localhost Log on to the server: Use Windows Authentication Select or enter a database name: InternetSalesNote When you create a connection manager, it is named automatically based on theserver and database name; for example, localhost.InternetSales. If you have previouslycreated a connection manager for the same database, a name such as
localhost.InternetSales1may be generated.
5. In the Configure OLE DB Connection Managerdialog box, verify that a new data connection islisted, and then click OK.
6. In the SSIS Toolbox pane, in the Favoritessection, double-click Source Assistant.7. In the Source Assistant -Add New Sourcedialog box, in the Select source typelist, select
SQL Server, in the Select connection managerlist, select the connection manager for the
localhost.InternetSales database that you created previously, and then click OK.
8. Drag the new OLE DB Sourcedata source to the center of the Data Flow surface, right-click it, clickRename, and then change the name of the data source to Customers.
9. Double-click the Customerssource, set the following configuration values, and then click OK: On the Connection Managerpage, ensure that the OLE DB connection manager for the
localhost.InternetSales database is selected, ensure that the Table or viewdata access mode is
selected, and then in the Name of the table or the viewdrop-down list, click
[dbo].[Customers].
On the Columnstab, ensure that every column from the Customerstable is selected, and thatthe output columns have the same names as the source columns.
Task 4: Add a data destination to a data flow1. In the SSIS Toolbox pane, in the Favoritessection, double-click Destination Assistant.2. In the Destination Assistant - Add New Destinationdialog box, in the Select destination typelist,
click SQL Server, in the Select connection managerlist, click localhost.Staging, and then click OK.
3. Drag the new OLE DB Destination data destination below the Customersdata source, right-click it,click Rename, and then change the name of the data destination to Staging DB.
4. On the Data Flow surface, click the Customerssource, and then drag the blue arrow from theCustomersdata source to the Staging DBdestination.
-
8/12/2019 10777A ENU TrainerHandbook Part4
37/150
Lab 4: Implementing Data Flow in an SSIS Package L4-19
5. Double-click the Staging DBdestination, set the following configuration values, and then click OK: On the Connection Managerpage, ensure that the localhost.StagingOLE DB connection
manager is selected, ensure that the Table or view fast loaddata access mode is selected, in
the Name of the table or the viewdrop-down list, click [dbo].[Customers], and then click
Keep nulls.
On the Mappingstab, drag the CustomerKeycolumn from the list of available input columns tothe CustomerBusinessKeycolumn in the list of available destination columns. Then verify that
that all other input columns are mapped to destination columns of the same name.
Task 5: Test the Data Flow task1. Right-click anywhere on the Data Flow surface, click Execute Task, and then observe the task as it
runs, noting how many rows are transferred.
2. On the Debugmenu, click Stop Debugging.3. Close Visual Studio.
-
8/12/2019 10777A ENU TrainerHandbook Part4
38/150
L4-20 Module 4: Creating an ETL Solution with SSIS
Exercise 3: Using Transformations in a Data Flow
Task 1: Examine an existing data flow1. View the contents of the D:\10777A\Labfiles\Lab04\Starter folder, and then double-click Ex3to view
the contents of the Ex3 folder.
2. Double-click the AdventureWorksETL.slnVisual Studio solution file to open it in Visual Studio.3. In the Solution Explorer pane, double-click Extract Reseller Data.dtsx.4. On the Data Flowtab, in the Data Flow Taskdrop-down list, click Extract Reseller Sales. Note that
this data flow includes a data source, two transformations, and two destinations.
5. Double-click the Reseller Salesdata source, in the OLE DB Source Editordialog box, note thefollowing details, and then click Cancel:
On the Connection Managerpage, the data source is configured to use an OLE DB connectionmanager named localhost.ResellerSalesand extract data using a Transact-SQL command that
queries in the SalesOrderHeader, SalesOrderDetail, and PaymentTypestables. The query
includes an ISNULL function to check for a payment type. If none is specified, the value other is
used.
On the Columnstab, the data source is configured to retrieve several columns includingProductKey, OrderQuantity, and UnitPrice.
6. Double-click the Calculate Sales Amounttransformation, in the Derived Column TransformationEditordialog box, note the following details, and then click Cancel:
The transformation creates a derived column named SalesAmount. The derived column is added as a new column to the data flow. The column value is calculated by multiplying the UnitPricecolumn value by the OrderQuantity
column value.
7. Double-click the Lookup Product Detailstransformation, in the Lookup Transformation Editordialog box, note the following details, and then click Cancel:
On the Generaltab, the Lookup transformation is configured to use full cache mode and an OLEDB connection manager, and to redirect rows with no matching entries.
On the Connectiontab, the Lookup transformation is configured to return the results of aTransact-SQL query using the localhost.ProductsOLE DB connection manager. The query
returns a