Tải bản đầy đủ (.pdf) (31 trang)

Tài liệu Pro SQL Server 2008 Analysis Services- P10 docx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.32 MB, 31 trang )

A P P E N D I X A

  

431
Setting Up Adventure Works
Through most of this book, I work with a demonstration data set called AdventureWorks. It’s a
multidimensional data warehouse and Analysis Services project based on a fictional bicycle company,
which has both retail and Internet sales.
I really enjoy working with this data set. It’s true that it’s a bicycle store, and as I’ve often
commented, “just about wholly unrelated to anything anyone does.” However, although it may not be
related to the business of various SSAS users, it is something that just about everyone can understand.
If you’ve downloaded sample databases from Microsoft before, you’ve gotten them from
Microsoft.com. A few years ago, Microsoft moved all the samples to www.codeplex.com, their open source
community, so they would be covered by the open source licensing there.
The sample databases are located at the following site:
www.codeplex.com/MSFTDBProdSamples
Click the Downloads link in the top-right corner. Then download
SQL2008.AdventureWorks_All_Databases—either x64 or x86, depending on the architecture you’re
running. (There’s a .zip file that has the same contents.) Then run the MSI on your SQL Server (Figure
A-1).
 Note CodePlex uses a Silverlight applet for the download prompt. So if you try to download from a locked-down
server, the link won’t do anything. To enable it, add
*.codeplex.com
to your trusted sites. Alternatively, download
the file from a desktop PC and copy it to the server.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
APPENDIX A  SETTING UP ADVENTURE WORKS
432

Figure A-1. Installing the samples


The wizard prompts you for the location to install the files (Figure A-2). The default installation
location is C:\Program Files\Microsoft SQL Server\100\. The Program Menu Shortcuts option will add
shortcuts to the Start menu. The Create AdventureWorks DBs option will generate the databases in the
server you select in the next step.
 Note You must have Full Text Search and FileStream installed on the server to create the databases, or the
wizard will error out.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
APPENDIX A  SETTING UP ADVENTURE WORKS
433

Figure A-2. Selecting options and the location to install the sample files
The final step is to select the SQL Server instance to install the databases into (Figure A-3).

Figure A-3. Selecting the database instance
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
APPENDIX A  SETTING UP ADVENTURE WORKS
434
If you don’t use the wizard, you can always install the databases yourself with the script files
installed. To do this, open the Tools\Samples\AdventureWorks 2008 Data Warehouse folder from where
you installed it. (If you installed the shortcuts with the MSI, there will be a shortcut to the folder in the
Start Menu.)
 Note If you use the wizard to install the databases, do not run the scripts afterward. The first thing the script
will do is drop the existing database, and if you haven’t set up the script properly, it will error out immediately
afterward. It’s a very confusing state to be left in, because it will look like the script created all the databases but
one, when in fact the databases were already created and the script dropped that one.
Open the instawdwdb.sql file. If you have the SQL client tools installed, double-clicking the file
should open SQL Server Management Studio. If you don’t have the SQL client tools installed, you can
copy the scripts to a PC where the client tools are available, or you can use the SQLCMD command-line
parameter to run the scripts. If you installed the files into the default location, you should be able to run
this query file, and it will create the database and populate it. After the database is created, verify that it’s

in place on the server.
To build the cubes necessary for reviewing some of the examples in the book, you’ll need to open
the OLAP projects and build the cubes (these were not automatically created by the wizard). Open
Tools\Samples\AdventureWorks Analysis Services Project. You’ll see two folders, enterprise and
standard. Choose the folder that matches the edition of SQL Server Analysis Services you have installed.
In that folder, you’ll find an Adventure Works.sln file; double-click that to open the solution in BIDS.
After you have the solution open in BIDS, you’ll need to make two changes. First, in the Solution
Explorer, double-click the AdventureWorks data source, and enter the server name for where you
installed the AdventureWorks DW database. Next, right-click on the solution (the topmost Adventure
Works in bold), and select Properties. Click Deployment in the list on the left. Find the Server entry
under Target and change that to the server name you want to deploy the cubes to when you process
them. Click OK.
Deploy the project, process the cubes (see Chapter 8), and you’re all set!

Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
A P P E N D I X B

  

435
Data-Mining Resources
Books
Data Mining with SQL Server 2005, by ZhaoHui Tang and Jamie MacLennan (Wiley, 2005)
Data Warehousing, Data Mining, & OLAP, by Alex Berson and Larry Dubov (McGraw-Hill, 2007)
Delivering Business Intelligence with Microsoft SQL Server 2005, by Brian Larson (McGraw-Hill, 2006)
Foundations of SQL Server 2005 Business Intelligence, by Lynn Langit (Apress, 2007)
Web Sites
SQLServerDataMining.com:

www.sqlserverdatamining.com

Microsoft SQL Server 2008 Data Mining page:

www.microsoft.com/sqlserver/2008/en/us/data-mining.aspx
Microsoft SQL Server forums:


SQL Server Books Online:


About.com: “Data Mining: An Introduction”:


Analysis Services Resource Hub:

www.ssas-info.com
SQL Server TechCenter:


Sample Databases for Microsoft SQL Server 2008: Samples Refresh 4:

Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

437
Index
 A
Access property, data sources, 350
Accessory Buyers marketing campaign, 277
adding Naïve Bayes mining model to, 305
creating Accessory Buyers mining structure,

304–305
creating data source view, 281
creating views in AdventureWorks, 278–
281
Data Mining Extensions, 303–310
Data Mining Model Designer, 289–303
predicting accessory buyers, 308–310
preparing data warehouse, 278–281
processing, DMX, 305–306
viewing mining model, 306–308
AccessoryCampaign DSV
creating, 281
creating data-mining model, 283
account attributes, assigning, 254
Account dimension, 137, 138
AdventureWorks project, 138, 139
browsing, 139
unary operators, 256
account intelligence, 254–255
account business intelligence, 139
choosing Standard/Enterprise SSAS, 45
unary operators, 255
Action Designer, 268, 269
action type, 269
actions, 34–35, 251, 265–270
drill-through actions, 265, 266
executing as part of process, SSIS, 345–
348
general actions, 268, 269
invoking via Excel, 266, 267

reporting, 267, 268
Active Directory security, 348
Add Business Intelligence Wizard
Dimension menu, 139
additive measure, aggregations, 32
administration
PowerShell, 92–95
SQL Server Management Studio, 86–92
AdventureWorks cube
BIDS, 60
calculated measures, 189
creating, 190–193
dimension usage table, 181
looking at, 125
MDX and SQL, 219
partition folders, 57–58
processing, 333–335
processing Analysis Services objects from
BIDS, 211, 212
using Excel writeback, 315
AdventureWorks project
Accessory Buyers campaign, 277
Account dimension, 138, 139
creating Accessory Buyers views in, 278–281
creating cubes, 173–178
creating Date dimension, 161
creating dimension, 127–134
sample databases, 431
setting up, 431–434
specifying dimension storage modes, 142–

148
AdventureWorks schema, 120
AdventureWorks solution
creating data-mining model, 282
DSV from, 9, 10
Affected Objects section, Change Settings dialog,
336
aggregate functions, MDX, 241–245
Avg function, 241–242
TopCount function, 242–244
Aggregation Design Wizard
creating aggregations, 361
Review Aggregation Usage screen, 362
Set Aggregation Options screen, 363, 364
Specify Object Counts screen, 362, 363
Aggregation Designer, 71, 72, 361
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
 INDEX
438
aggregation, OLAP
setting Unary Operator on parent attribute,
139
types of, 31–32
AggregationPrefix property, measure groups, 185
aggregations
additive measure, 32
Analysis Services, 359–367
attributes, 226
CALCULATE statement, 186
combining numerical data, 183

creating, 360–365
cubes, 27
LazyAggregations setting, 140
measure groups, 185
measures, 183
nonadditive measures, 32, 183
performance management, SSAS, 359–367
preparing for use, 365–367
processing Analysis Services objects, 204
semiadditive measures, 32, 183
algorithms, data mining see data mining algorithms
All member, 221
AllowedBrowsingFolders property, 56
AMO (Analysis Management Objects), 340–343
PowerShell with SSAS, 94
processing Analysis Services objects from,
215
AMO Automation deployment method, 198
AMO design warnings, 72, 135–136
Dismiss Warning dialog, 135
mismatching types, 138
viewing status of warnings in database, 136
Warnings tab, 136
ampersand, MDX, 222
Analysis Management Objects see AMO
Analysis Services
see also SSAS
actions, 251
aggregations, 359–367
Analysis Management Objects, 340–343

attribute relationship design, 353
authentication, 348–349
authorization, 348, 349–352
autoexists feature, 351
building attribute relationship in dimension,
151
CALCULATE statement, 186
combining numerical data, 183
connecting to database, 85
creating project, 82–84
cubes, 89–90
AMO design warnings, 135–136
automating cube processing, 339
BIDS, 60
processing, 333–335
data source views, 88–89
data sources, 87–88
connections from OLAP to Excel, 375, 389
data-mining structures, 90
DBA tasks, 333–348
design, 352–359
dimensions, 90, 353
example showing power of, 188
executing actions as part of process, SSIS,
345–348
facts, 183
hardware requirements, 41–42
importing database into new project, 86
interacting with SSAS, 75
key performance indicator, 11

logical architecture, 49–51
managing, 87–90
named calculations, 110
partitions, 359
performance management, 352–371
Performance Monitor, 337–339
PerformancePoint Server, 423
PowerShell, 343
pre-calculation caching, 359
preparing aggregations for use, 365
processing architecture, 336–337
processing objects, 204, 205
from AMO, 215
from BIDS, 208–214
from SSMS, 214
from XMLA, 215
processing options, 335–336
Profiler trace, 337
relating measures and dimensions, 178, 179–
181
roles, 90
scalability, 367–369
security, 348–352
selecting connection to, 347
setting Unary Operator on parent attribute,
139
SQL Server 2005, 8
SQL Server Analysis Services (SSAS), 8
SQL Server Profiler, 337
SQL Server Reporting Services, 401

synchronizing SSAS databases, 202–204
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
 INDEX
439
task configuration, 346
unified dimensional model, 46–49
user-friendly interface for, 373
using DMX development environment, 303
using Excel writeback, 319
VertiPaq mode, 311, 320
Windows Integrated Authentication, 348
Analysis Services data table
building Excel report, 122
Analysis Services databases
deploying projects, 195
Analysis Services objects
processing with XMLA queries, 340
scheduling processing of, 343–345
SQL Server Agent, 344–345
Analysis Services Processing Task
scheduling OLAP maintenance, 215,
216
Analysis Services Project
creating data sources, 102
Analysis Services Server
connecting SSMS to, 366
Analyze tab
pivot charts, Excel 2007, 388
Ancestor function, MDX, 239
ancestors and descendants, 240

APL, history of OLAP, 7
architecture
BI architecture, 47
processing, Analysis Services, 336–337
architecture, SSAS, 46–59
logical architecture, 49–51
physical architecture, 52–54
storage, 54–59
AS keyword, MDX queries, 237
asdatabase file, SSAS, 202
Assembly objects
SSAS logical architecture, 51
assets
account intelligence, 254, 255
Associated Measure Group, Cube Designer, 191
calculated measures, 261
association predictions algorithm, 277
Attribute Designer, BIDS, 354
attribute ordering, BI, 257
attribute relationship design, Analysis Services, 353
attribute relationship designer, Dimension Editor,
70, 71
attribute relationships, dimensions, 151, 155
snowflake schema, 150, 151
star schema, 150, 151
AttributeHierarchyDisplayFolder property, 156
AttributeHierarchyEnabled property, 156
AttributeHierarchyVisible property, 156
attributes
aggregating, 226

aggregation design, 362
attribute relationships, 150–156
creating dimension with, 152–156
creating from data source view, 149
creating tool tip with dimension attribute, 21
design, SSAS, 353–355
dimension types, 138
dimensions, 21
dimensions, SSAS, 148–156
editing full collection of properties for, 81
MDX notation, 222
mismatching types, 138
OrderBy property, 156
OrderByAttribute property, 156
parent-child attribute in dimension, 157
properties, 156
Select Dimension Attributes page, 129, 130
setting, 129
showing all attribute values for dimension,
150
attribute-store processing job, 336
authentication
Analysis Services, 348–349
credentials, 101
user authenticating against Web application,
349
Windows Integrated Authentication, 348
authorization
Analysis Services, 348, 349–352
double-hop problem, 348

roles, 349–352
autoexists feature, Analysis Services, 351
Average function, tuples, 228
Avg function, MDX, 241–242
axes, MDX queries, 233
Axis Properties
configuring axis in SSRS 2008, 412
 B
Backup deployment method, 198
balance, account intelligence, 255
balanced hierarchy, 25
BI (business intelligence), 251–258
account intelligence, 254–255
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
 INDEX
440
Add Business Intelligence Wizard, 139
attribute ordering, 257
Business Intelligence Wizard, 251, 252
currency conversion, 257–258
custom member formulas, 256
dimension intelligence, 255
staging database solution, 48
time intelligence, 252–254
traditional BI architecture, 47
unary operators, 255–256
BIDS (Business Intelligence Development Studio),
75–86
AdventureWorks cube, 60
Aggregation Designer in, 361

Attribute Designer, 354
background, 8
browser, 12, 192
creating Analysis Services Project, 82–84
creating cubes, 170–178
creating data sources, 102
creating dimension, 127
creating DSV, 107–109
cube browser, 13
cube design wizard, 63
cube structures in SSAS, 59
data sources in Solution Explorer in, 98
database solutions, 82–86
deploying projects to development server
from, 195
dimension design, 69
KPI designer in, 12
measure groups, 182, 184
measures, 182
Measures pane, 182
methods for creating time tables, 160
New Project Wizard, 8
opening SSAS database, 84–85
as part of project, 85–86
panes, 76–79
Partitions tab, 356, 357
Perspective Designer, 271
processing Analysis Services objects from,
208–214
Properties pane, 80–82

setting up Adventure Works, 434
Solution Explorer, 79–80
SSIS designer in, 346
tablix, 404
user-friendly interfaces for OLAP solutions,
373–429
Visual Studio, 75–76
BIDS 2005
Dimension Wizard, 69
storage of measures and measure groups, 71
BIDS 2008
Aggregation Designer, 71, 72
AMO design warnings, 72, 135–136
as stand-alone install, 76
cube specific tabs, 77
Dimension Wizard, 70
panes, 76, 77
solution tabs, 77
Usage-Based Optimization Wizard, 72
BIDS browser, 12
viewing measures, 192
Bill of Materials dimension, 137
Binding type
using partitions, 357
BIOS data, PowerShell getting, 93
block computing, optimization
SQL Server 2008, 68
bottom-up design, data warehouses, 37
Browser tab, dimension designer, 131, 132, 134
specifying dimension storage modes, 142,

147
browsers
BIDS browser, 12, 192
dimension browser, 139
Build tab properties
project properties dialog, 197
business intelligence see BI
Business Intelligence Development Studio see BIDS
Business Intelligence Wizard, 251, 252
ByAttribute/ByTable methods
processing dimensions, 353
 C
caching
pre-calculation, Analysis Services, 359
ProactiveCaching property, dimensions, 141
CALCULATE statement, 186
processing Analysis Services objects, 207, 208
calculated dimension members
calculated measures, 185
calculated measures, 33–34, 185–193, 251
calculated dimension members, 185
Calculations tab, Cube Designer, 259–262
creating, 190–193
query-scoped calculated measure, 236
session-scoped calculated measure, 236
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
 INDEX
441
calculated members, creating, 186
Calculation Tools section, Cube Designer, 187, 262

calculations
designing calculations in cubes, 186
named calculations, DSV, 110–112
time calculations, 252
Calculations page, Cube Designer, 186, 192
Calculation Tools section, 187
creating calculated measure, 190
Script Organizer section, 186
Calculations tab, Cube Designer, 258–262
calculated measures, 259–262
named sets, 262
calendars
Date dimension, 160
setting up fiscal calendar, 163
Time dimension, 159
CASE statement
calculated measures, 189
catalogs, SSAS, 56, 57
CDC (Change Data Capture), 68
Cell Data tab, roles, 351
Cell Styles gallery
pivot tables, Excel 2007, 383
Change Settings button, Process Cube dialog, 335
Change Settings dialog
processing Analysis Services objects from
BIDS, 211
Processing options tab, 335
Channel dimension, 137
charts
see also pivot charts

SQL Server Reporting Services, 410–418
Children function, MDX, 234, 240
classification predictions algorithm, 276, 277
Clear Writeback Data action, 313
Client Initiated option, notifications
storage properties, dimensions, 142
Clustering algorithm, 276
Codd, E.F., 7
CodePlex
setting up Adventure Works, 431
Color Expressions section, Cube Designer
creating calculated measure, 191
Column Content Specify dialog
creating data-mining model, 287
composite key, 169
conditional formatting for values
pivot tables, Excel 2007, 383, 384
Config.ini file
changing location, 54
configsettings file, SSAS, 202
configuration files for SSAS solution, 201
Configuration Manager button, Properties dialog,
196
configuration properties
Specify Configuration Properties screen, 200,
201
Connect to Database dialog
opening SSAS database, 84, 85
Connection Manager
creating data sources, 103

Connection Properties dialog, Excel, 377, 378
connection types, Report Builder 2.0, 419
connections
data source connections from OLAP to Excel,
374–378
containers, for dimension members, 148
Convert to Partition action, writeback, 313
CoordinatorExecutionMode property, 336
count measure, OLAP engines, 27
counter groups, MSAS 2008, 338
Create AdventureWorks DBs option, 432
Create an empty cube option, Cube Wizard, 170
Create Data Mining Structure dialog, 283
CREATE MEMBER statement, MDX, 236
Create Testing Set dialog, 287, 288
credentials, 101
double-hop problem, 348
crosstab result set, SQL, 220
cub folder, 57
cube browser
BIDS, 13
SSMS, 90
Cube class, 51
Cube Creation Wizard, 8
cube design wizard, BIDS, 63
Cube Designer
actions, 265–270
calculated measures, 259–262
Calculations page, 186
Calculations tab, 258–262

Dimension Usage tab, 314
enabling/disabling Excel writeback, 313
key performance indicators, 263–265
named sets, 262
perspectives, 270–272
translations, 272–273
Cube Editor, Dimensions pane, 81
opening Dimension Editor from, 82
Cube menu
creating calculated member, 186
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.
 INDEX
442
cube specific tabs, BIDS 2008, 77
cube structures, SSAS, 59–65
cube structure, 63–64
data source view (DSV), 61–62
data sources, 61
dimensions, 64
mining structures, 65
Cube Wizard
Create an empty cube option, 170
creating cubes, 170
Generate tables in the data source option,
170
Select Creation Method page, 174
Select Existing Dimensions page, 173, 176
Select Measure Group Tables page, 170, 171,
174, 175
Select Measures page, 171–172, 175, 176

Select New Dimensions page, 176, 177
Use existing tables option, 170, 171, 173, 174
Welcome page, 173, 174
CubeDimension objects, SSAS, 51
CubePermission collection, SSAS, 51
cube-processing job, 337
cubes, 15–18
aggregations, 27, 31–32, 359–367
availability when processing, 208
calculated measures, 33–34, 185–193
creating, 170–178
creating empty cube, 170
creating skeleton dimensions and
measures, 170
selecting dimensions, 173, 176
selecting measure group tables, 170–171,
174, 175
selecting measures, 171–172, 175, 176
using existing tables, 170–172, 174
cube with dimensions and members, 29
data source view (DSV), 97–98
DBA tasks, Analysis Services, 333–348
designing calculations in cubes, 186
designing for performance, 352–359
attributes design, 353–355
dimensions, 353
partitions, 356–359
dimensions, 16, 18, 20–27, 63, 118
creating skeleton dimensions and
measures, 170

relating measures and dimensions, 179–
181
selecting dimensions, 173, 176
folders for, 57
from pivot tables to dimensional processing,
4
hierarchies, 25
identifiers (members), 16
linking data and parameters, 16
managing Analysis Services, 89–90
measure groups, 63, 184–185
selecting measure group tables, 170–171,
174, 175
measures, 17, 18, 27–31, 63, 182–184
creating skeleton dimensions and
measures, 170
relating measures and dimensions, 179–
181
selecting measures, 171–172, 175, 176
metadata locations, 55
partition folders, 57–58
performance management, SSAS, 352–371
Process dialog, 208
processing
Analysis Services, 206, 207, 333–335
automating, 339
reprocessing, 340
scheduling, 343
relational databases and, 18
schemas, 18–20

security, Analysis Services, 348–352
selecting members of dimensions on cube,
30, 31
selecting, Data Connection Wizard, 376
selection of various members, 31
setting up Adventure Works, 434
time dimensions, 161
tuples, 227
tuples, MDX, 223
viewing details of SSAS cube in SSMS, 9
writeback, 32–33
Cubes folder, Solution Explorer, 170
Cubes tab, roles, 350
currency conversion, BI, 257–258
Currency dimension, 137, 138, 140
CurrentMember function, MDX, 235, 245
custom member formulas, BI, 256
Customer dimension, 137
 D
Dashboard Designer, PerformancePoint Server,
424, 425
dashboard, MOSS 2007, 420, 421
Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark.

×