Presentation is loading. Please wait.

Presentation is loading. Please wait.

Southern California Code Camp at USC October 15-16, 2011 SQL Server Analysis Services Planning & Implementation By: Ben Aminnia President, L.A. SQL Server.

Similar presentations


Presentation on theme: "Southern California Code Camp at USC October 15-16, 2011 SQL Server Analysis Services Planning & Implementation By: Ben Aminnia President, L.A. SQL Server."— Presentation transcript:

1 Southern California Code Camp at USC October 15-16, 2011 SQL Server Analysis Services Planning & Implementation By: Ben Aminnia President, L.A. SQL Server Professionals Group Database Architect and.NET Developer, Pointer Corporation

2 Southern California Code Camp at USC October 15-16, 2011 SQL Server Analysis Services Planning (80%) & Implementation (20%) By: Ben Aminnia President, L.A. SQL Server Professionals Group Database Architect and.NET Developer, Pointer Corporation

3 3 Agenda Introduction Introduction Presentation Presentation Questions and Answers Questions and Answers

4 4 Introduction Primary Objective: Explore a recent implementation of Analysis Services, with focus on some important planning tasks. Explore a recent implementation of Analysis Services, with focus on some important planning tasks. Presentation Style: We will be placed in a unique setting called: Live from SQL Server Studios We will be placed in a unique setting called: Live from SQL Server Studios I will be the interviewer – telling you about an Analysis Services application one of my staff had developed. I will be the interviewer – telling you about an Analysis Services application one of my staff had developed. Now that he has left the company, Im interviewing you for his position. Now that he has left the company, Im interviewing you for his position.

5 5 Introduction Why the Interview Model: Look at it from an IT Managers viewpoint; Look at it from an IT Managers viewpoint; This is not a sales presentation, showing off the cool stuff in a new product; This is not a sales presentation, showing off the cool stuff in a new product; This is not a Whats New in SSAS presentation either; This is not a Whats New in SSAS presentation either; Dont expect click here – click there – voila! Dont expect click here – click there – voila! We may not even show off any Wizard screens; We may not even show off any Wizard screens;

6 6 Introduction Interview Structure: Ill present a task and seek your opinion. Ill present a task and seek your opinion. You will share your thoughts with me and will tell me how you would approach that task. You will share your thoughts with me and will tell me how you would approach that task. I will then show you how my ex-employee accomplished that task. I will then show you how my ex-employee accomplished that task. Finally, you will have your turn to make comments and state your opinion: Finally, you will have your turn to make comments and state your opinion: You may agree with the presented approach; You may agree with the presented approach; You may agree and also extend it further according to your viewpoint; You may agree and also extend it further according to your viewpoint; You may disagree and offer an alternative approach. You may disagree and offer an alternative approach.

7 7 Final Goals Four Stages of an SSAS System: 1. Vision 2. Architecture 3. Development of various pieces 4. Periodic data loads and refreshing pivot tables

8 8 At the Receptionists Desk

9 9 Advice from the Receptionist As we walk down the hallway to the conference room for your interview, let me tell you a little bit about Bens Analysis Services project: The Stethoscope The Stethoscope The Thermometer The Thermometer The Wheel The Wheel The Charts The Charts

10 10 Interview Question #1 How many servers do you need in order to implement an Analysis Services system? A) One server can host everything we need A) One server can host everything we need B) At least two (for DWH / Data Mart and AS) B) At least two (for DWH / Data Mart and AS) C) At least three (for DEV, QA, and Production) C) At least three (for DEV, QA, and Production) D) It depends … Could be more D) It depends … Could be more

11 11 Interview Question #1 How many servers do you need to implement an Analysis Services system? A) One server can host everything we need A) One server can host everything we need B) At least two (for DWH / Data Mart and AS) B) At least two (for DWH / Data Mart and AS) C) At least three (for DEV, QA, and Production) C) At least three (for DEV, QA, and Production) D) It depends … Could be more (virtual / in the cloud) D) It depends … Could be more (virtual / in the cloud)

12 12 Interview Question #2 What do you need to do before building the 1 st Cube? A) Open the Cube Wizard A) Open the Cube Wizard B) Run ETL to populate a Data Mart B) Run ETL to populate a Data Mart C) Plan the measures and the schemas C) Plan the measures and the schemas D) Setup SSIS and SSAS D) Setup SSIS and SSAS

13 13 Interview Question #2 What do you need to do before building the 1 st Cube? A) Open the Cube Wizard A) Open the Cube Wizard B) Run ETL to populate a Data Mart B) Run ETL to populate a Data Mart C) Plan the measures and the schemas C) Plan the measures and the schemas D) Setup SSIS and SSAS D) Setup SSIS and SSAS

14 14 Interview Question #3 Whats your definition of Analysis Services?

15 15 Interview Question #4 Whats the value of ONE RECORD in a SQL Server table?

16 16 At the Heart of ETL … Avoid Fundamental Mistakes or Mis-conceptions! Do not overlook the measures which are the heart of the solution and jump on building the databases and the cubes. Do not overlook the measures which are the heart of the solution and jump on building the databases and the cubes. An analytical solution is all about numbers. An analytical solution is all about numbers. A beautiful chart does not guaranty useful results. A beautiful chart does not guaranty useful results. AS data is not like customer address table. AS data is not like customer address table. Theres virtually no room for retroactive data corrections. Theres virtually no room for retroactive data corrections.

17 17 At the Heart of ETL … Focus on the Target – Aerial Photos Wont Help! At the heart of the ETL process, look for data sources that are accessible and agreeable to both users and architects. At the heart of the ETL process, look for data sources that are accessible and agreeable to both users and architects. Start with a stethoscope that picks up one heart beat or a thermometer that reads one body temperature accurately and consistently. Start with a stethoscope that picks up one heart beat or a thermometer that reads one body temperature accurately and consistently.

18 18 Ground Rules Any Solution Must Answer a Well-known Problem A solution that doesnt tell you which problem it is solving is not worth our time. A solution that doesnt tell you which problem it is solving is not worth our time. The technology tools, like builders and wizards, are only part of the solution. The technology tools, like builders and wizards, are only part of the solution. Re-use Existing Solutions Do not re-invent the wheel. Do not re-invent the wheel. Use the right-size wheel according to the car manufacturers specifications. Use the right-size wheel according to the car manufacturers specifications. Think End-to-End

19 19 Enough Lecturing!

20 20 Problem Statement Heres a summary of system requirements: 1. The DBA at a SQL Server shop with dozens of servers needs to monitor disk space utilization of these servers. 2. Servers are both within firewalls and in the DMZ. 3. Monitoring intervals are not fixed. 4. Every server may not necessarily be available when the monitor job runs.

21 21 Problem Statement Additional Notes and Requirements: 5. Both Free-space and Used-space amounts need to be monitored (in MB and GB). 6. Free-space and Used-space DELTA amounts (from last monitor date to the current) are needed as well. 7. If a server was not available on the last monitor date, its DELTA amount needs to be calculated from its most recent available date until current date.

22 22 Feasibility Analysis & Some Critical Questions Before Drawing a Roadmap and Planning the Stops on our Trip … Is Server Disk-space Planning a good project for Analysis Services? Is Server Disk-space Planning a good project for Analysis Services? How would you compare and contrast this to a typical Sales Forecast model? How would you compare and contrast this to a typical Sales Forecast model? How would our model behave if we delete a 100 GB database, or move it to a different server? How would our model behave if we delete a 100 GB database, or move it to a different server? What if we zip / archive some of the folders? What if we zip / archive some of the folders?

23 23 The Road Map Processing Stages: 1. Collect data about server space information and store in a staging database; 2. Perform additional calculations as needed; 3. Populate fact tables in the Data Mart; 4. Update / add to dim tables in the Data Mart; 5. Transfer data from Data Mart fact & dim tables to Analysis Services database (Process); 6. Update user interface data (e.g. Refresh Excel Pivot Tables);

24 24 But Wait!

25 25 Interview Question #2 What do you need to do before building the 1 st Cube? A) Open the Cube Wizard A) Open the Cube Wizard B) Run ETL to populate a Data Mart B) Run ETL to populate a Data Mart C) Plan the measures and the schemas C) Plan the measures and the schemas D) Setup SSIS and SSAS D) Setup SSIS and SSAS

26 26 Interview Question #2 What do you need to do before building the 1 st Cube? A) Open the Cube Wizard A) Open the Cube Wizard B) Run ETL to populate a Data Mart B) Run ETL to populate a Data Mart C) Plan the measures and the schemas C) Plan the measures and the schemas D) Setup SSIS and SSAS D) Setup SSIS and SSAS

27 27 1 st Star Schema: DM_Ben_Freespace

28 28 1 st Star Schema FreespaceFact CREATE TABLE [dbo].[FreespaceFact]( [Freespace_id] [int] IDENTITY(1,1) NOT NULL, [server_fk] [int] NULL, [drive_fk] [int] NULL, [cycle_fk] [int] NULL, [mb_free] [int] NULL, [gb_free] [int] NULL

29 29 1 st Star Schema CycleDim CREATE TABLE [dbo].[CycleDim]( [cycle_id] [int] IDENTITY(1,1) NOT NULL, [cycle] [int] NULL, [cycle_date] [datetime] NULL, [year_number] [int] NULL, [month_number] [int] NULL, [day_number] [int] NULL, [week_number] [int] NULL, [day_of_the_week] [int] NULL

30 30 1 st Star Schema ServerDim CREATE TABLE [dbo].[ServerDim]( [server_id] [int] IDENTITY(1,1) NOT NULL, [name] [nchar](50) NULL, [location] [nchar](50) NULL, [ip] [nchar](15) NULL, [stage] [nchar](10) NULL

31 31 1 st Star Schema DriveDim CREATE TABLE [dbo].[DriveDim]( [drive_id] [int] IDENTITY(1,1) NOT NULL, [server_id] [int] NOT NULL, [server_name] [nchar](50) NULL, [drive_letter] [nchar](1) NOT NULL

32 32 2 nd Star Schema: DM_Ben_Usedspace

33 33 2 nd Star Schema UsedspaceFact CREATE TABLE [dbo].[UsedspaceFact]( [usedspace_id] [int] IDENTITY(1,1) NOT NULL, [server_fk] [int] NULL, [drive_fk] [int] NULL, [cycle_fk] [int] NULL, [file_fk] [int] NULL, [size] [nvarchar](18) NULL, [size_kb] [bigint] NULL, [size_mb] [bigint] NULL, [size_gb] [bigint] NULL, [maxsize] [nvarchar](18) NULL, [growth] [nvarchar](18) NULL, [usage] [varchar](9) NULL

34 34 2 nd Star Schema FileDim CREATE TABLE [dbo].[FileDim]( [file_id] [int] IDENTITY(1,1) NOT NULL, [server_fk] [int] NULL, [server_name] [sql_variant] NULL, [drive_fk] [int] NULL, [drive_letter] [nvarchar](1) NULL, [DatabaseName] [nvarchar](128) NULL, [DB_fileid] [smallint] NULL, [DatabaseFileName] [nvarchar](128) NULL, [filename] [nvarchar](260) NULL, [filegroup] [nvarchar](128) NULL

35 35 The Road Map Processing Stages: 1. Collect data about server space information and store in a staging database; 2. Perform additional calculations as needed; 3. Populate fact tables in the Data Mart; 4. Update / add to dim tables in the Data Mart; 5. Transfer data from Data Mart fact & dim tables to Analysis Services database (Process); 6. Update user interface data (Refresh Excel Pivot Tables);

36 36 The Road Map Processing Stages: 1. Collect data about server space information and store in a staging DB; 2. Perform additional calculations as needed; 3. Populate fact tables in the Data Mart; 4. Update / add to dim tables in the Data Mart; 5. Transfer data from Data Mart fact & dim tables to Analysis Services database (Process); 6. Update user interface data (Refresh Excel Pivot Tables);

37 37 Data Collection

38 38 Data Collection

39 39 Data Collection

40 40 Data Collection

41 41 Data Collection

42 42 Data Collection

43 43 Data Collection XX

44 44 Data Collection Take 1 Write a couple of stored procedures Write a couple of stored procedures Define each target server as a linked server Define each target server as a linked server Define logins for each target linked server Define logins for each target linked server Run the stored procedures against each target linked server Run the stored procedures against each target linked server Continue with loading the fact and dimension tables, the cubes, and the Excel pivot tables Continue with loading the fact and dimension tables, the cubes, and the Excel pivot tables

45 45 Data Collection Take 1

46 46 Data Collection Take 1

47 47 Data Collection Take 1

48 48 Data Collection Take 1

49 49 Data Collection Take 1 – Pros and Cons Pros: It worked! It worked! Opportunity to refine those stored procedures Opportunity to refine those stored procedures

50 50 Data Collection Take 1 – Pros and Cons Cons: Too many manual steps Too many manual steps Problems with access to linked servers Problems with access to linked servers Extra work to add a new servers Extra work to add a new servers

51 51 Data Collection Take 2 Try to automate some of the process; Try to automate some of the process; Look for a reusable wheel … Dont re-invent! Look for a reusable wheel … Dont re-invent!

52 52 Data Collection Take 2 Try to automate some of the process; Try to automate some of the process; Look for a reusable wheel … Dont re-invent! Look for a reusable wheel … Dont re-invent!

53 53 Data Collection The Wheel

54 54 Data Collection The Wheel

55 55 Data Collection Additions to the Wheel

56 56 Data Collection Additions to the Wheel

57 57 Data Transfer From Data Mart to Analysis Services Design Time through 1 st Full Transfer: Easier to develop Easier to develop Longer to run Longer to run Cyclical Updates: Shorter run-time Shorter run-time Complex development logic to identify what to transfer and how Complex development logic to identify what to transfer and how

58 58 Data Delivery to End-Users XX

59 59 Data Delivery to End-Users

60 60 Data Delivery to End-Users Reporting Services: Part of The Wheel – SSIS & SSRS Part of The Wheel – SSIS & SSRS Excel Pivot Tables: 2003 Version 2003 Version 2007 Version 2007 Version 2010 Version 2010 Version

61 61 Presentation

62 62 Questions and Answers

63 63 Additional References SQL Server Magazine Article – February html?Ad=1SQL Server Magazine Article – February html?Ad=1 40.html?Ad=1 40.html?Ad=1 SQL Server 2008 Analysis Services Step by Step – Scott CameronSQL Server 2008 Analysis Services Step by Step – Scott Cameron Data Mining with Microsoft SQL Server 2008 – Jamie MacLennanData Mining with Microsoft SQL Server 2008 – Jamie MacLennan Foundations of SQL Server 2005 Business Intelligence - Lynn LangitFoundations of SQL Server 2005 Business Intelligence - Lynn Langit Practical Business Intelligence with SQL Server John C. Hancock and Roger TorenPractical Business Intelligence with SQL Server John C. Hancock and Roger Toren A Decision Maker's Overview of Business Intelligence in SQL Server 2005 – Ben Aminnia Decision Maker's Overview of Business Intelligence in SQL Server 2005 – Ben Aminnia

64 64 Contact Information s: s: Websites:Websites:

65 65 Thank You!


Download ppt "Southern California Code Camp at USC October 15-16, 2011 SQL Server Analysis Services Planning & Implementation By: Ben Aminnia President, L.A. SQL Server."

Similar presentations


Ads by Google