Professional Documents
Culture Documents
2791A
Implementing and Maintaining Microsoft
SQL Server 2005 Analysis Services
Companion Content
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.
2007 Microsoft Corporation. All rights reserved.
Microsoft and the trademarks listed at
http://www.microsoft.com/about/legal/en/us/IntellectualProperty/Trademarks/EN-US.aspxare trademarks
of the Microsoft group of companies. All other marks are property oftheir respective owners.
Module 2
Creating Multidimensional Analysis Solutions
Contents:
Lab Answer Keys 2
2-2 Implementing and Maintaining Microsoft SQL Server 2005 Analysis Services
4. In the Available objects list, click dbo.DimCustomer, and then hold down the CTRL key
and click dbo.DimGeography, dbo.DimProduct, dbo.DimTime, and
dbo.FactInternetSales.
5. On the Select Tables and Views page, click the >button to add the selected tables to the
Included objects list, and then click Next.
6. On the Completing the Wizard page, change the name of the data source view to
Adventure Works DSV, and then click Finish. Note that the Data Source View Designer
opens automatically after you click Finish.
Creating Multidimensional Analysis Solutions 2-3
CASE
WHEN MiddleName IS NULL THEN
FirstName + ' ' + LastName
ELSE
FirstName + ' ' + MiddleName + ' ' + LastName
END
Year CalendarYear
Quarter CalendarQuarter
Month EnglishMonthName
2-4 Implementing and Maintaining Microsoft SQL Server 2005 Analysis Services
Date FullDateAlternateKey
8. On the Select Measures page, clear the Promotion Key, Currency Key, Sales Territory
Key, and Revision Number checkboxes, and then click Next.
9. On the Detecting Hierarchies page, wait for the wizard to finish analyzing the relationships,
and then click Next.
10. On the Review New Dimensions page, click Next.
11. On the Completing the Wizard page, change the Cube name to Adventure Works Cube,
and then click Finish. Notice that the Cube Designer opens automatically after you click
Finish.
Task 2: Modify the cube
1. In the Measures pane of the Cube Designer, expand the Internet Sales measure group,
and then click the Unit Price Discount Pct measure.
2. In the Properties pane, change the Name to Unit Price Discount Percent.
3. In the Measures pane, click Tax Amt.
4. In the Properties pane, change the Name to Tax Amount.
5. On the Cube Structure tab of the Cube Designer, click the Show Measures Grid icon.
6. In the Measures pane, click Unit Price, and then hold the CTRL key and click the Extended
Amount, Discount Amount, Product Standard Cost, Total Product Cost, Sales Amount,
and Tax Amount measures.
7. In the Properties pane, click Currency in the FormatString box.
8. In the Measures grid, click Unit Price Discount Percent.
9. In the Properties pane, click Percent in the FormatString box.
Task 3: Browse the cube
1. In Solution Explorer, right-click the Adventure Works OLAP project, and then click
Deploy.
2. When deployment has completed successfully, click the Browser tab in the Cube Designer.
Tip: Click the Auto Hide icon on the various panes in Business Intelligence Development
Studio to make it easier to see the entire Cube Browser window.
3. In the Metadata pane, expand Measures, expand Internet Sales, and then drag the Sales
Amount measure to the Drop Totals or Detail Fields Here area of the Data pane.
4. In the Metadata pane, drag Internet Sales Count and drop it next to the Sales Amount
column.
5. In the Metadata pane, drag Unit Price Discount Percent and drop it next to the Internet
Sales Count column.
6. Verify that the format strings for the measures are correct.
7. In the Metadata pane, expand the Order Date dimension. Drag the Order Date.Calendar
Year hierarchy to the Drop Row Fields Here area of the Data pane.
Creating Multidimensional Analysis Solutions 2-5
8. In the Metadata pane, expand the Customer dimension, expand the Full Name attribute,
expand the Members node, expand the All node, and verify that the named calculation
created in Exercise 2 is functioning.
Module 3
Working with Dimensions
Contents:
Lab Answer Keys 2
3-2 Implementing and Maintaining Microsoft SQL Server 2005 Analysis Services
7. In the Hierarchies and Levels pane, click the title row of the Calendar Year - Calendar
Semester Name - Calendar Quarter Name - Month Name Simple Date hierarchy.
8. In the Name box in the Properties pane, remove the existing text and type Calendar Time.
9. In the Hierarchies and Levels pane, click the Calendar Semester Name level.
Working with Dimensions 3-3
10. In the Properties pane, change Calendar Semester Name to Calendar Semester in the
Name box.
11. Change the name of the Calendar Quarter Name level to Calendar Quarter.
2. In the Attributes pane, right-click English Country Region Name, and then click Rename.
Rename the attribute to Country-Region.
3. Rename the State Province Name attribute to State-Province.
4. In the Hierarchies and Levels pane of the Dimension Structure tab, click the title row of
the State Province Name Geography hierarchy.
5. In the Properties pane, replace State Province Name Geography with Customer
Geography in the Name property box.
6. Drag the Country-Region attribute from the Attributes pane, to just above the State
Province Name level in the Customer Geography hierarchy in the Hierarchies and Levels
pane.
7. Drag the City attribute from the Attributes pane into the Customer Geography hierarchy
just above the Customer level.
8. In the Hierarchies and Levels pane, right-click Geography, and then click Delete.
9. In the Hierarchies and Levels pane, right-click State Province Name level, and then click
Rename.
10. Rename the State Province Name level to State-Province.
11. In the Attributes pane, click Customer.
12. In the Properties pane, expand NameColumn, expand Source, and then click FullName in
the ColumnID box.
13. In the Attributes pane, expand Geography. Notice the attribute relationships that are listed.
You will move some of these attributes to the appropriate locations to support the
Customer Geography natural hierarchy.
14. In the Attributes pane, expand Full Name, and then drag the Postal Code attribute
relationship from the Geography attribute to the<new attribute relationship>tag under
the Full Name attribute.
15. In the Attributes Pane, expand the Postal Code attribute, and then drag the City attribute
relationship from the Geography attribute to the<new attribute relationship>tag under
the Postal Code attribute.
16. In the Attributes Pane, expand the City attribute, and then drag the State Province Name
attribute relationship from the Geography attribute to the<new attribute
relationship>tag under the City attribute.
17. In the Attributes Pane, expand the State-Province attribute, and then drag the English
Country Region Name attribute relationship from the Geography attribute to the<new
attribute relationship>tag under the State-Province attribute.
18. In Solution Explorer, right-click the Adventure Works OLAP solution, and then click
Deploy. Wait for the Deploy Succeeded message in the status bar.
19. On the Customer.dim Dimension Designer, click the Browser tab.
20. On the Browser tab, click the Reconnect icon, ensure that the Customer Geography
hierarchy is selected in the Hierarchy box, and then expand the levels of the hierarchy to
view the data.
21. Close the Customer.dim Dimension Designer.
Working with Dimensions 3-5
21. Expand Ken J Snchez, expand Peter J Krebs, expand JoLynn M Dobney, click Simon D
Rapier, and notice that the level name is Employee Level 05.
22. Close the Employee.dim Dimension Designer.
1. In Solution Explorer, right-click the Time.dim dimension, and then click View Designer.
2. In Solution Explorer, right-click the Adventure Works OLAP solution, and then click Deploy.
Wait for the Deploy Succeeded message in the status bar.
3. Click the Browser tab of the Time.dim Dimension Designer, and then click the Reconnect
icon.
4. In the Hierarchy box, click Calendar Time, and then expand the levels. Notice that the
months are listed under the correct quarter, semester, and year, but that they are sorted in
alphabetical order instead of chronological order.
5. Click the Dimension Structure tab.
6. In the Data Source View pane, right-click MonthNumberofYear, and then click New
Attribute from Column.
7. In the Attributes column, click Month Number of Year.
8. If necessary, click the Properties tab.
9. In the Properties pane, set the following values:
Property Value
AttributeHierarchyEnabled False
AttributeHierarchyOptimizedState NotOptimized
AttributeHierarchyOrdered False
10. In the Attributes pane, expand TimeKey. Notice that all attributes are related directly to the
TimeKey attribute.
11. In the Attributes pane, expand the Month attribute, and then drag the Month Number of
Year attribute to the <new attribute relationship>tag under the Month attribute.
12. In the Attributes pane, click Month.
13. In the Properties pane, click AttributeKey in the OrderBy box, and then in the
OrderByAttribute box, click Month Number Of Year.
14. In Solution Explorer, right-click the Adventure Works OLAP solution, and then click Deploy.
Wait for the Deploy Succeeded message in the status bar.
15. On the Browser tab of the Time.dim Dimension Designer, click the Reconnect icon.
16. If necessary, in the Hierarchy box, click Calendar Time. Expand the hierarchy to the month
level and notice that the months are now in date order rather than alphabetical order.
17. Close the Time.dim Dimension Designer.
Task 2: Group the Yearly Income attribute hierarchy members in the Customer
dimension
1. In Solution Explorer, right-click the Customer.dim dimension, and then click View Designer.
2. In the Data Source View pane, right-click the Customer table, and then click Explore Data.
Notice the range of values for the Yearly Income column.
3. On the Explore DimCustomer Table tab, click the Close icon.
Working with Dimensions 3-7
Module 4
Working with Measures and Measure Groups
Contents:
Lab Answer Keys 2
4-2 Implementing and Maintaining Microsoft SQL Server 2005 Analysis Services
3. Browse to the D:\Labfiles\Starter folder, click Adventure Works OLAP.sln, and then click
Open.
Task 2: Modify the format of the Internet Sales Count and Reseller Sales Count
measures
1. In Solution Explorer, under the Cubes folder, right-click Adventure Works Cube.cube, and
then click View Designer.
2. On the Cube Structure tab, click the Show Measures Grid button.
3. In the Measures pane, click the Internet Sales Count, then press the CTRL key and click
Reseller Sales Count.
4. In the Properties pane, in the FormatString box, click #,#.
Task 3: Organize measures into display folders
1. In the Measures pane, use the CTRL key to select the Internet Sales SalesAmount,
Internet Sales Tax Amount, and Internet Sales Freight measures.
2. In the Properties pane, in the DisplayFolder box, type Sales.
3. In the Measures pane, use the CTRL key to select the Internet Sales Unit Price, Internet
Sales-Product Standard Cost, and the Internet Sales Unit PriceDiscounted Percentage
measures.
4. In the Properties pane, type Products in the DisplayFolder box.
5. In the Measures pane, use the CTRL key to select the Internet Sales-Order Quantity,
Internet Sales-Extended Amount, Internet Sales-Discount Amount,Internet Sales-Total
Product Cost, and Internet Sales Count measures.
6. In the Properties pane, type Other in the DisplayFolder box.
7. In Solution Explorer, right-click the Adventure Works OLAP project, and then click Deploy.
8. When deployment has completed successfully, click the Browser tab in the Cube Designer.
3. In the Metadata pane, expand Measures, expand Reseller Sales, and then drag the
Reseller Sales-Sales Amount measure to the Drop Totals or Detail Fields Here area.
4. In the Metadata pane, expand the Geography dimension, right-click the Geographies
hierarchy, and then click Add to Row Area. Notice that the sales amount value is the same
for all members.
5. In the Solution Explorer, right-click the Reseller.dim dimension, and then click View
Designer.
6. In the Data Source View area of the Reseller.dim Dimension Designer tab, right click the
GeographyKey column, and then click New Attribute from Column.
7. Click the Cube Designer tab, and then click Dimension Usage tab. Notice that there is no
relationship between the Geography dimension and the Reseller Sales measure group.
8. On the Dimension Usage tab, click the box at the intersection of the Geography dimension
and the Reseller Sales measure group, and then click the ellipsis ()button in that box.
9. In the Define Relationship window, click Referenced in the Select relationship type box,
click Reseller in the Intermediate dimension box, click Geography Key in the Reference
dimension attribute box, click Geography Key in the Intermediate dimension attribute
box, and then click OK.
10. In Solution Explorer, right-click the Adventure Works OLAP solution, and then click Deploy.
11. When deployment has completed successfully, click the Browser tab of the Cube Designer,
and then click the Reconnect icon. Notice that the Reseller Sales SalesAmount measure
values are now displayed correctly for the Geographies hierarchy.
Task 2: Create a fact relationship
1. On the Adventure Works Cube.cube Designer tab, click the Cube Structure tab.
2. In the Dimensions pane, right-click anywhere, and then click Add Cube Dimension.
10. Select the Customer PO Number dimension attribute, and then click Finish.
11. On the Completing the Wizard page, type Internet Sales Order Details in the Name box,
and then click Finish.
17. In the Object Binding window, click Column binding in the Binding type list, click Product
in the Source table list, click EnglishProductName in the Source column list, and then click
OK.
18. On the Dimension Structure tab, drag the SalesOrderNumber column from the Data
Source View pane to the Attributes pane to create a new attribute for the Sales Order
Number.
19. Drag the Sales Order Number attribute from the Attributes pane to the Hierarchies and
Levels pane.
20. Drag the Item Description attribute to just below the Sales Order Number level in the
Hierarchies and Levels pane.
21. In the Hierarchies and Levels pane, right-click Hierarchy, click Rename, and then type
Internet Sales Orders as the new hierarchy name.
22. Click the Adventure Works Cube.cube Designer tab.
23. In the Cube Designer, click the Dimension Usage tab. Notice that a fact relationship was
automatically created at the intersection of the Internet Sales OrderDetails dimension and
the Internet Sales measure group.
24. In Solution Explorer, right-click the Adventure Works OLAP solution, and then click
Deploy.
29. In the Metadata pane, expand Customer, Location, Customer Geography,Members, All
Customers, Australia, New South Wales, Goulburn, and 2580, right-click Alexandra H
Watson, and then click Add to Subcube Area.
30. In the Metadata pane, expand Internet Sales Order Details, and then drag the Internet
Sales Orders hierarchies to the Drop Row Fields Here area to view the two sales orders for
this customer.
Working with Measures and Measure Groups 4-5
9. When the process is complete, note the number of aggregations designed and the amount
of disk space the aggregations will take, and then click Next.
10. On the Completing the Wizard page, verify that Save the aggregations but do not
process them is selected, and then click Finish.
Querying Multidimensional Analysis Solutions 5-1
Module 5
Querying Multidimensional Analysis Solutions
Contents:
Lab Answer Keys 2
5-2 Implementing and Maintaining Microsoft SQL Server 2005 Analysis Services
Tip: You can hide Solution Explorer and Object Explorer by clicking their Auto Hide buttons.
Hiding these windows makes it easier to work in the MDX query editor.
4. In the MDX query editor, type the following code, and then click Execute.
SELECT
[Date].[Calendar Time].[Calendar Year].members ON COLUMNS,
[Customer].[Customer Geography].[Country-Region].members ON ROWS
FROM
[Adventure Works UDM]
WHERE
[Measures].[Internet Sales-Sales Amount]
5. View the results. Then click File, click Save MDXQuery1.mdx As, browse to the
D:\Labfiles\Starter folder, type Internet Sales-Country.mdx in the File name box, and then
click Save.
Task 2: Write an MDX query to show reseller sales amounts for 2003 and 2004
across countries
1. In SQL Server Management Studio, click the Analysis Services MDX Query button, and on
the Connect to Analysis Services window, click Connect.
2. In the MDX query editor, type the following code, and then click Execute.
SELECT
{
([Measures].[Reseller Sales-Sales Amount],
[Date].[Calendar Year].[CY 2003]),
([Measures].[Reseller Sales-Sales Amount],
[Date].[Calendar Year].[CY 2004])
} ON COLUMNS,
[Reseller Geography].[Geographies].[Country-Region].members
ON ROWS
FROM [Adventure Works UDM]
3. View the results. Then click File, click Save MDXQuery2.mdx As, browse to the
D:\Labfiles\Starter folder, type ResellerSales-Country-Year.mdx in the File name box, and
then click Save.
Querying Multidimensional Analysis Solutions 5-3
Task 3: Write an MDX query to show reseller sales amounts by country for
accessories, clothing, and components product categories
1. In SQL Server Management Studio, click the Analysis Services MDX Query button, and on
the Connect to Analysis Services window, click Connect.
2. In the MDX query editor, type the following code, and then click Execute.
SELECT
{
([Measures].[Reseller Sales-Sales Amount],
[Product].[Product Categories].[Category].&[4]),
([Measures].[Reseller Sales-Sales Amount],
[Product].[Product Categories].[Category].&[3]),
([Measures].[Reseller Sales-Sales Amount],
[Product].[Product Categories].[Category].&[2])
}
ON COLUMNS,
[Reseller Geography].[Geographies].[Country-Region]
ON ROWS
FROM [Adventure Works UDM]
3. View the results. Then click File, click Save MDXQuery3.mdx As, browse to the
D:\Labfiles\Starter folder, type Reseller Sales-Country-Category.mdx in the File name box,
and then click Save.
4. Close SQL Server Management Studio.
[Reseller Geography].[Geographies].[Country-Region].&[France] +
[Reseller Geography].[Geographies].[Country-Region].&[Germany] +
[Reseller Geography].[Geographies].[Country-Region].&[United Kingdom]
2. In the Calculations Expressions pane, type [Quota Difference] in the Name box, and then
verify that MEASURES is selected in the Parent hierarchy box.
3. In the Expression box, type the following code.
2. In the Script Organizer, highlight the line immediately before the SCOPE (ROOT()) line, and
then click the New Named Set button.
3. In the Expression pane, in the Name box type, [North American Customers].
{[Customer].[Customer Geography].[Country-Region].&[Canada],[Customer].[Customer
Geography].[Country-Region].&[United States]}
9. In the Data pane, click anywhere, and then click the Clear Results button.
10. In the Metadata pane, expand Measures, expand Internet Sales, right-click Internet Sales
Sales Amount, and then click Add to Data Area.
11. In the Metadata pane, expand Customer, expand Location, and drag the Customer
Geography hierarchy to the Drop Row Fields Here area.
12. In the Metadata pane, under Customer, right-click North American Customers, and then
click Add to Subcube Area. Notice that the query results now only include data for Canada
and the United States.
13. Close Business Intelligence Development Studio.
Task 2: Define a query-scoped named set
1. Click Start, point to All Programs, point to Microsoft SQL Server 2005, and then click SQL
Server Management Studio.
2. In the Connect to Server window, click Analysis Services in the Server type box, verify that
MIAMI is selected in the Server name box, and then click Connect.
3. In the SQL Server Management Studio, click the Analysis Services MDX Query button,
and on the Connect to Analysis Services window, click Connect.
4. In the MDX query editor, type the following code, and then click Execute.
5. View the results. Then click File, click Save MDXQuery1.mdx As, browse to the
D:\Labfiles\Starter folder, type Named Set Query.mdx in the File name box, and then click
Save.
Customizing Cube Functionality 6-1
Module 6
Customizing Cube Functionality
Contents:
Lab Answer Keys 2
6-2 Implementing and Maintaining Microsoft SQL Server 2005 Analysis Services
Case
When KpiValue( "Actual Sales VS Quotas" ) /
KpiGoal( "Actual Sales VS Quotas" ) >= .83
Then 1
When KpiValue( "Actual Sales VS Quotas" ) /
KpiGoal( "Actual Sales VS Quotas" ) < .83
And
KpiValue( "Actual Sales VS Quotas" ) /
KpiGoal( "Actual Sales VS Quotas" ) >= .80
Then 0
Else -1
End
Tip: You can copy the code for the status expression from the KPIExpressions.txt text file in
the D:\Labfiles\Starter folder.
10. Verify that Standard arrow is selected in the Trend indicator box.
11. Type the following code in the Trend Expression box.
Customizing Cube Functionality 6-3
Case
When IsEmpty
(ParallelPeriod
([Date].[Calendar Time].[Calendar Year],1,
[Date].[Calendar Time].CurrentMember))
Then 0
When (
KpiValue("Actual Sales VS Quotas") -
(KpiValue("Actual Sales VS Quotas"),
ParallelPeriod
([Date].[Calendar Time].[Calendar Year],1,
[Date].[Calendar Time].CurrentMember))
/
(KpiValue ("Actual Sales VS Quotas"),
ParallelPeriod
([Date].[Calendar Time].[Calendar Year],1,
[Date].[Calendar Time].CurrentMember)))
>=.02
Then 1
When(
KpiValue("Actual Sales VS Quotas") -
(KpiValue( "Actual Sales VS Quotas" ),
ParallelPeriod
([Date].[Calendar Time].[Calendar Year],1,
[Date].[Calendar Time].CurrentMember))
/
(KpiValue("Actual Sales VS Quotas"),
ParallelPeriod
([Date].[Calendar Time].[Calendar Year],1,
[Date].[Calendar Time].CurrentMember)))
<0
Then -1
Else 0
End
Tip: You can copy the code for the trend expression from the KPIExpressions.txt
text file in the D:\Labfiles\Starter folder.
2. On the KPIs tab, click the Browser View button, and then click the Reconnect button.
3. In the Filter pane, click Date in the Dimension box, click Calendar Year in the Hierarchy
box, click Equal in the Operator box, and then select CY 2002 and click OK in the Filter
Expression list. Then press ENTER to update the KPI display.
4. Leave the Business Intelligence Development Studio open.
5. Click Start, point to All Programs, point to Microsoft SQL Server 2005, and then click SQL
Server Management Studio.
6. In the Connect to Server window, in the Server type box, click Analysis Services. In the
Server name box, verify that MIAMI is selected, and then click Connect.
7. On the File menu, point to Open, and then click File. Then browse to the D:\Labfiles\Starter
folder, click KPIQuery.mdx, and then click Open.
6-4 Implementing and Maintaining Microsoft SQL Server 2005 Analysis Services
8. When prompted, ensure that MIAMI is selected in the Server name box, and then click
Connect.
9. In the Available Databases list, click Adventure Works OLAP.
Tip: Click the Auto Hide button on the Object Explorer and Solution Explorer windows to
make it easier to see the query editor.
4. In the Perspective Name column, clear the Reseller Sales Measure Group checkbox to
clear all Reseller Sales measures check boxes.
5. Clear the check boxes for the Sales Quotas and Sales Quotas 1 measure groups.
6. Clear the check boxes for the Reseller, Reseller Geography, Sales Territory, Employee,
and Promotion dimensions.
7. Clear the check box for the Actual Sales VS Quotas KPI.
8. Clear the check box for the Large Resellers Named Set.
9. Clear the check boxes for all of the calculated members.
10. On the File menu, click Save All.
Module 7
Deploying and Securing an Analysis Services Database
Contents:
Lab Answer Keys 2
7-2 Implementing and Maintaining Microsoft SQL Server 2005 Analysis Services
4. On the Installation Target page, change the value in the Database box to Adventure
Works OLAP Copy, and then click Next.
5. On the Specify Options for Partitions and Roles page, click Next.
6. On the Specify Configuration Properties page, click Next.
7. On the Select Processing Options page, click Next.
8. On the Confirm Deployment page, select the Create deployment script check box, and
then click Next.
9. On the Deploying Database page, wait for the deployment script to be completed, and
then click Next.
10. On the Deployment Complete page, click Finish.
Task 2: Review and run the deployment script
1. Click Start, point to All Programs, point to Microsoft SQL Server 2005, and then click SQL
Server Management Studio.
2. In the Connect to Server window, in the Server type list, click Analysis Services, verify that
MIAMI is selected in the Server name list, and then click Connect.
3. In SQL Server Management Studio, on the File menu, point to Open, and then click File.
4. In the Open File window, browse to the D:\Labfiles\Starter\Adventure Works OLAP\bin
folder, click Adventure Works OLAP Copy Script.xmla, and then click Open.
4. Click Add, and then in the Select Users or Groups window, in the Enter the object names to
select box, type ASAdmin, click Check Names, and then click OK.
5. Click OK to close the Analysis Server Properties dialog box.
6. Close SQL Server Management Studio.
Task 3: Add a new role with the ability to process the database
1. Click Start, point to All Programs, point to Microsoft SQL Server 2005, and then click SQL
Server Business Intelligence Development Studio.
2. On the File menu, point to Open, click Project/Solution, browse to the D:\Labfiles\Starter
folder, click Adventure Works OLAP.sln, and then click Open
3. In Solution Explorer, right-click Roles, and then click New Role.
4. In Solution Explorer, click Role.role.
5. In the Properties pane, change the File Name to DB Process Role.role, and then press
ENTER. When prompted, click Yes to change the object name as well.
6. On the General page of the Role Designer, select the Process database and Read
definition check boxes.
7. Click the Membership tab, and then in the Specify the users and groups for this role
area, click Add.
8. In the Select Users or Groups window, type ProcessAdmin, click Check Names, and then
click OK.
9. On the File menu, click Save All.
10. Close the Role Designer.
Task 4: Add a new role with specific cube and dimension permissions
1. In Solution Explorer, right-click Roles, and then click New Role.
2. In Solution Explorer, click Role1.role.
3. In the Properties pane, change the File Name to Marketing Manager Role.role, and then
press ENTER. When prompted, click Yes to change the object name as well.
7-4 Implementing and Maintaining Microsoft SQL Server 2005 Analysis Services
4. Click the Membership tab, and then in the Specify the users and groups for this role
area, click Add.
5. In the Select Users or Groups window, type DBradley, click Check Names, and then click
OK.
6. Click the Cubes tab, and then in the Cube area, in the Access column, click Read.
7. Click the Dimensions tab. Notice that the role has been automatically granted Read access
to all dimensions in the cube.
8. Click the Cell Data tab, and then select the Enable read permissions check box.
9. In the Allow reading of cube content box, type the following MDX code.
14. Notice that the value of the Sales Amount Quota is not visible.
15. On the Browser page, click the Change User button.
16. In the Security Context dialog box, click Roles, clear all currently selected roles, and then
select the DB Process Role. Then click OK to close the Security Context dialog box.
17. Notice that you cannot browse the cube.
18. Close Business Intelligence Development Studio.
Task 7: Test server role security
1. Click Start, point to All Programs, point to Microsoft SQL Server 2005, rightclick SQL
Server Management Studio, and then click Run as.
2. Select The following user, and then in the User name box, type ASAdmin and in the
Password box, type Pa$$w0rd. Click OK.
3. In the Connect to Server window, click Analysis Services in the Server type box, type
MIAMI in the Server name box, and then click Connect.
4. In Object Explorer, browse the Adventure Works UDM and Adventure Works OLAP
databases.
5. In Object Explorer, expand the Adventure Works UDM database, right-click Roles, and
then click New Role.
6. In the Create Role window, in the Role name box, type TestRole, and then click OK. Verify
that the new role is created.
7. In Object Explorer, right-click the new role, and then click Delete.
8. In the Delete Objects window, click OK, and then click OK to verify that you want to
proceed. Verify that the role is deleted.
9. Close SQL Server Management Studio.
9. In the Create Role window, in the Role name box, type TestRole, and then click OK. Then
click OK in the error message stating that this user does not have permissions to create new
objects.
10. In the Create Role window, click Cancel to close the window.
11. Close SQL Server Management Studio.
Task 9: Test user security
1. Click Start, point to All Programs, point to Microsoft SQL Server 2005, rightclick SQL
Server Management Studio, and then click Run as.
2. Select The following user, and then in the User name box, type DBradley, and in the
Password box, type Pa$$w0rd. Then click OK.
3. In the Connect to Server window, in the Server type box, click Analysis Services, type
MIAMI in the Server name box, and then click Connect.
4. In SQL Server Management Studio, on the File menu, point to Open, and then click File.
5. Browse to the D:\Labfiles\Starter folder, click the TestDBradley.mdx file, and click Open.
When prompted, click Connect to connect to the MIAMI instance of Analysis Services.
6. Execute the query and verify that you can view the values for the Reseller Sales - Sales
Amount measure, but not for the Sales Amount Quota measure.
7. Close SQL Server Management Studio.
Maintaining a Multidimensional Solution 8-1
Module 8
Maintaining a Multidimensional Solution
Contents:
Lab Answer Keys 2
8-2 Implementing and Maintaining Microsoft SQL Server 2005 Analysis Services
Task 2: Write a script to perform a full process of the Reseller Sales partition
1. Click Start, point to All Programs, point to Microsoft SQL Server 2005, and then click SQL
Server Management Studio.
2. In the Connect to Server window, click Analysis Services in the Server type box, verify that
MIAMI is selected in the Server name box, and then click Connect.
3. Click the Auto Hide buttons to hide the Object Explorer and Solution Explorer windows.
4. In SQL Server Management Studio, click the Analysis Services XMLA Query button, and
then in the Connect to Analysis Services window, click Connect.
5. In the query window, type the following code.
<Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<Parallel>
<Process xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Object>
<DatabaseID>Adventure Works OLAP</DatabaseID>
<CubeID>Adventure Works DW</CubeID>
<MeasureGroupID>Reseller Sales</MeasureGroupID>
<PartitionID>Reseller Sales</PartitionID>
</Object>
<Type>ProcessFull</Type>
<WriteBackTableCreation>UseExisting</WriteBackTableCreation>
</Process>
</Parallel>
</Batch>
3. On the SQL Server Analysis Services Editor toolbar, in the Available Databases list, click
Adventure Works OLAP.
4. Review the query. Then on the toolbar, click Execute. Note that the value of the Reseller
Sales-Sales Amount is $80,450,596.98
5. On the File menu, point to Open, and then click File.
6. In the Open File dialog box, browse to the D:\Labfiles\Starter folder, click
InsertNewFact.sql, and then click Open.
7. In the Connect to Database Engine dialog box, click Connect.
8. Review and execute the SQL script. This script adds a new row into the FactResellerSales
table.
9. Click the query tab for the MDXQuery.mdx file, and then execute the query. Note that the
Reseller Sales-Sales Amount value has not changed.
Note: If you can not see the query tab with the MDXQuery.mdx file, click the Active Files
icon in the Query pane.
10. Click the ProcessPartition.xmla tab, and then click Execute. This will perform afull process
of the Reseller Sales partition.
11. Click the MDXQuery.mdx tab, and then execute the query. Notice that the value of the
Reseller Sales amount is now $80,450,935.98.
12. Leave SQL Server Management Studio open for the next exercise.
Note: Setting a sampling rate of one in every two queries is too frequent for most production
environments; it is used here to overcome the low query volume on a test server.
9. In Object Explorer, right-click the MIAMI instance of Analysis Services, and then click
Restart. When prompted to confirm the restart, click Yes.
10. Leave SQL Server Management Studio open so that you can use it later in this exercise.
4. In the Backup Database window, click OK. When the backup completes, the Backup
Database window will automatically close.
Task 2: Create a restore script for the Adventure Works OLAP database.
1. In Object Explorer, right-click the Adventure Works OLAP database, and then click Restore.
2. In the Restore target section, in the Restore database box, click Adventure Works OLAP.
3. In the Restore target section, in the From backup file box, type
D:\Labfiles\Starter\Adventure Works OLAP.abf.
4. In the Options section, select the Allow database overwrite check box.
5. On the toolbar, click Script.
2. In the Delete Objects window, click OK. Then verify that the Adventure Works OLAP
database has been deleted.
3. Execute the AWOLAPRestore.xmla script.
4. Wait for the query to finish running.
5. In the Object Explorer, right-click the Databases folder, and then click Refresh. Then verify
that the Adventure Works OLAP database has been successfully restored.
Introduction to Data Mining 9-1
Module 9
Introduction to Data Mining
Contents:
Lab Answer Keys 2
9-2 Implementing and Maintaining Microsoft SQL Server 2005 Analysis Services
Note: This configuration will only work if the TimeIndex column is unique across each
individual value in the ModelRegion column.
8. On the Specify Columns Content and Data Type page, click Next.
9. On the Completing the Wizard page, change the Mining structure name to Sales
Forecasting, change the model name to Time Series Forecast, and then click Finish.
Task 3: Modify a data mining structure
1. In the Sales Forecasting.dmm designer, click the Mining Models tab.
2. Right-click Time Series Forecast column heading, and then click Set Algorithm
Parameters.
3. In the Algorithm Parameters dialog box, type {12} in the Value column of the
PERIODICITY_HINT row, and then click OK.
Introduction to Data Mining 9-3
Note: The hint tells the algorithm that the data repeats itself every twelve periods (the data is
organized in months per year.)
Task 2: View the data mining model in the Sales Forecasting mining structure
1. Click the Sales Forecasting.dmm designer tab, and then click the Mining Model Viewer
tab.
2. In the Mining Model Viewer, verify that Time Series Forecast is selected in the Mining
Model box and that Microsoft Time Series Viewer is selected in the Viewer box.
3. In the Mining Model Viewer tab, click the Charts tab.
4. To the right of the Chart view, clear the check boxes for the M200 Europe:Quantity, M200
North America:Quantity, and M200 Pacific:Quantity series.
Tip: You can click the Auto Hide buttons to hide the various windows in the Microsoft
Visual Studio environment and make it easier to view the designer.
5. Review the chart displayed. Notice that the actual data is to the left of the vertical line and
noted by solid data lines, while predicted data is to the right of the vertical line and is noted
with dotted lines.
9-4 Implementing and Maintaining Microsoft SQL Server 2005 Analysis Services
Task 3: View the data mining models in the Targeted Mailing mining structure
1. Click the Targeted Mailing.dmm designer tab, and then click the Mining Model Viewer
tab.
2. In the Mining Model Viewer, verify that TM_Decision_Tree is selected in the Mining
Model name box and that Microsoft Tree Viewer is selected in the Viewer box.
3. On the Decision Tree page, in the Background box, click 1. This will chane the background
color of the nodes. The darker the color, the stronger the link to bicycle purchase.
4. In the Data area, use the scroll bars to view all of the nodes. Notice that people between the
ages of 33 and 40 who own no cars are most likely to buy a bicycle.
5. On the Mining Model Viewer page, click the Dependency Network tab.
6. All links are currently shown. Move the All Links slider down three stops. Notice that several
of the dependency lines disappear.
7. In the Data area, click the Bike Buyer node. Review the color legend at the bottom of the
page.
8. Move the All Links slider down to Strongest Links to find the most significant factor in
determining whether a customer will purchase a bicycle.
Resources
Contents:
Internet Links 2
R-2 Implementing and Maintaining Microsoft SQL Server 2005 Analysis Services
Internet Links
The Web sites listed below provide additional resources.
Analysis Services Overview
Analysis Services 2005 Performance Guide
Analysis Services 2005 Processing Architecture
Business Intelligence
Calculated Members and Key Performance Indicators (KPI)
Configuring the Analysis Services Query Log
Data Marts
Data Warehouse Design Considerations
Got Dot Net: Microsoft .NET Framework Community
Handling Data Integrity Issues in Analysis Services 2005
Introduction to SQL Server 2005 Analysis Services
Introduction to SQL Server 2005 Data Mining
Introduction to MDX Scripting in Microsoft SQL Server 2005
Microsoft Corporation
Microsoft Developer Network
Microsoft Internet Explorer
Microsoft Learning
Microsoft Product Support Services
Microsoft Security
Microsoft Visual Studio
SQL Server 2005 Analysis Services (SSAS) Server Properties
SQL Server 2005 Data Mining
Implementing and Maintaining Microsoft SQL Server 2005 Analysis Services R-3
Note Not all training products will have a Knowledge Base article if that is the case, please ask your
instructor whether or not there are existing error log entries.
Courseware Feedback
Send all courseware feedback to support@mscourseware.com. We truly appreciate your time and effort.
We review every e-mail received and forward the information on to the appropriate team. Unfortunately,
because of volume, we are unable to provide a response but we may use your feedback to improve your
future experience with Microsoft Learning products.
Reporting Errors
When providing feedback, include the training product name and number in the subject line of your e-
mail. When you provide comments or report bugs, please include the following:
Document or CD part number
Page number or location
Complete description of the error or suggested change
Please provide any details that are necessary to help us verify the issue.
Important All errors and suggestions are evaluated, but only those that are validated are added to the
product Knowledge Base article.