Microsoft has a lot of useful Business Intelligence (BI) tools in both SQL Server and Office. But why would you only use them to analyze your business?
Whether you want to keep a business up and running or a bunch of servers... both can benefit from the same tools.
In this talk we have a look at typical problems SQL Server administrators are facing... and how to analyze them using the Microsoft BI tools. From simple reporting up to data mining, this talk covers (and uncovers) them all...
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
SQL: Enough business intelligence time for administration intelligence
1. Enough BI, time for
Administration Intelligence!
Dr. Nico Jacobs, @SQLWaldorf
2. Business Intelligence is not about business
• Business Intelligence (BI) is applying tools to business
data
– Sales data
– Stock management
– …
• But why not apply these tools administration data?
– Log files
– Status tables
– …
3. 3 ways to get the Intelligence
1. Reporting
– Directly query the data
• Fastest to create
Query
4. When to use reporting?
• Reporting is ideal in situations where
1. You know which fields you want to see, and
2. There is only one interesting way to look at it
6. Demo: Custom reports in
Management Studio
Ingredients:
• SQL Server Data Tools
Business Intelligence
• Management Studio
(for SQL specific)
Steps
• Write a query to read
database log file sizes
• Run the wizard
• Adjust the report to
your own taste
• Run it in
Management Studio
7. Custom SSRS Reports
• Filtering, grouping and calculating derived values can
be done
– in the query (if you like SQL), or
– in the report (if you like VB.Net)
• Easy to add nice visualizations
• Integrates with Management Studio
• Adopts to context: current SQL Server instance and
database
• Support print, export and multi-page
8. Reporting Disadvantages
• Hard to reuse any work:
– Every new report requires new, complex queries
– Whenever the data source changes, we must
update all reports
– Certain report constructs can be challenging
• Growth figures
• Year-to-date calculations
9. 3 ways to get the Intelligence
1. Reporting
2. Modeling
– Copy relevant data in model
– Define all useful calculations once in the model
– Reuse them in multiple reports
Query
10. When to use modeling?
• Modeling is ideal in situations where
1. You know which fields you want to see, and
2. There are multiple interesting ways to look at
the problem
11. Modeling tools
• SQL Server Analysis Services Multi-dimensional
• SQL Server Analysis Services Tabular
• Excel PowerPivot
• Pentaho Mondrian
• IBM Cognos
• Microstrategy
• …
12. Demo: Building a model in
PowerPivot
Ingredients
• Excel 2010 or 2013
for the modeling and
pivot report
• Excel 2013 for the
PowerView report
Steps
• Load data into
PowerPivot model
• Create relationships
between tables
• Defined calculations
where needed
• Build reports to taste
13. Building models
Advantages
• Easy to quickly create
multiple reports
• Allows for advanced
analysis
• Lots of reuse options
Disadvantages
• More work before first
report is available
• Need to master two
querying tools
14. 3 ways to get the Intelligence
1. Reporting
2. Modeling
3. Mining
– Define search space of possible ‘patterns’
– Report on the discovered patterns
Query
15. When to use data mining?
• Data mining is useful when:
– You don’t know which fields you want to see!
– You do know what type of pattern you’re
interested in
– You do have relevant historical data
16. Small case study: Capacity planning
• We could start with very simple model:
– 1 variable linear regression, easy 2D chart
0
100
200
300
400
500
600
700
800
900
10 12 14 16 18 20 22 24 26 28 30
Indexes vs mdf size
17. Multiple variables
• But what if we have more information?
– If we know the number of clustered and non-
clustered indexes, we must work in 3D…
– If we know number of tables as well, we must
work in 4D
– And if we add columns, blob columns, … we
quickly end in 10D or more
18. Linear regression
• One of the many patterns that data mining
can discover is linear regression formulas
in multiple dimensions
19. Regression trees
• If we add to our model non-numeric
information (server name, database type),
we could build different regression formulas
for different situations
• This is a regression tree
20. Many types of patterns
• Regression trees is just one of the many
types of data mining available
22. Demo: Analyzing Report server log
files with data mining
Ingredients
• SQL Server
Analysis Services
Multi-Dimensional
• Excel 2007 or later
with Data Mining
add-in
Steps
• Load relevant data
in Excel worksheet
• Use Excel Analysis
ribbon to select
relevant type of
pattern
23. Conclusions
• The Business Intelligence tools are not just for business
analysts!
• If you know which are the important fields to report
upon
– And you can only imagine one way to look at it: use
reporting
– But you can come up with multiple views on these fields:
use modeling
• If you don’t know which are the important fields in a
certain problem, consider data mining
24. Get the material
• You can download this presentation, report
definitions and Excel workbooks from
http://1drv.ms/1quLAnw