13.proactive caching

Upload: prasadnagireddy

Post on 04-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 13.Proactive Caching

    1/8

    Proactive Caching (Behind the scene)

    I have written on Proactive cachingearlier in my posts. Proactive caching

    provides developer automatic management of cube processing when changeshappens on relational database. Proactive caching feature provides differentstandard settings on how frequently you want to detect changes and get real timedata. This article will be covering internal processing which happens behind thescene.

    Let me take example of "Automatic MOLAP" where different parameter valuesare:

    1) Silence Interval = 10 seconds2) Silence Override Interval = 10 minutes

    Snapshot1

    I have set "SQL Server Notification" on "Targets" table.

    http://learnmicrosoftbi.blogspot.com/2010/10/proactive-caching-sql-server-2008.htmlhttp://learnmicrosoftbi.blogspot.com/2010/10/proactive-caching-sql-server-2008.htmlhttp://learnmicrosoftbi.blogspot.com/2010/10/implementation-of-proactive-caching-in.htmlhttp://learnmicrosoftbi.blogspot.com/2010/10/implementation-of-proactive-caching-in.htmlhttp://learnmicrosoftbi.blogspot.com/2010/10/proactive-caching-sql-server-2008.htmlhttp://learnmicrosoftbi.blogspot.com/2010/10/implementation-of-proactive-caching-in.html
  • 7/30/2019 13.Proactive Caching

    2/8

    Now deploy changes on cube and we are ready for receiving changes fromrelational database. Lets configure "SQL Server Profiler" on analysis server so wecan track all the changes happening on the server.

    We will change Target table data and see events in profiler:

    view plain print ?

    1. UPDATE [dbo].[TARGETS]

    2. SET InternetSalesRevenue = 150000003. WHERE CalendarYear = 2005

    http://learnmicrosoftbi.blogspot.com/2010/10/proactive-caching-sql-server-2008.htmlhttp://3.bp.blogspot.com/_ntCExJSVw8o/TLVuffvzrrI/AAAAAAAAMYA/QRssnlPQsb4/s1600/PC_AutomaticMOLAP.JPGhttp://learnmicrosoftbi.blogspot.com/2010/10/proactive-caching-sql-server-2008.htmlhttp://learnmicrosoftbi.blogspot.com/2010/10/proactive-caching-sql-server-2008.htmlhttp://learnmicrosoftbi.blogspot.com/2010/10/proactive-caching-sql-server-2008.html
  • 7/30/2019 13.Proactive Caching

    3/8

    Step 1: Analysis Services recieves notification on changes in "Target" table.Step2:Analysis Services waits for "Silence Interval" time period.Step3: If no changes detected in "Silence interval" time period then it reprocessthe cube.If you view snapshot1 closely then you will see one informational message relatedto login access on bottom.

    Implementation of Proactive Caching in Sql Server 2005

    http://learnmicrosoftbi.blogspot.com/2010/10/implementation-of-proactive-caching-in.htmlhttp://2.bp.blogspot.com/_ntCExJSVw8o/TLV2gafuayI/AAAAAAAAMYM/laZoWVKC23I/s1600/PC_AutomaticMOLAP2.JPGhttp://3.bp.blogspot.com/_ntCExJSVw8o/TLVxAwKTS1I/AAAAAAAAMYI/72Yaiiv_DqE/s1600/PC_Profiler.JPGhttp://learnmicrosoftbi.blogspot.com/2010/10/implementation-of-proactive-caching-in.html
  • 7/30/2019 13.Proactive Caching

    4/8

    In the postAnalysis Services Storage Modes, I have explained different storagemodes in Analysis Services like ROLAP, MOLAP and HOLAP. In ROLAP data willnot be obsolete because for each analysis services query, we connect to relationaldatabase but in MOLAP and HOLAP, data becomes old after the cubeprocessing(if there are DB changes). Now if there are changes happening on

    relational database then it can come in Analysis Server only on reprocessing.Proactive caching feature of Analysis Services provides the way to detect newchanges and reprocess cube to reflect new changes by its own.Proactive Cachingtries to minimize latency and maximize performance.Proactive caching can

    be set for partitions as well as for dimensions.

    Before starting "How to implement Proactive caching", lets understand fewterminologies which will be useful in configuring different strategies in Proactivecaching.Proactive Caching can be configured by using SSMS(Sql Servermanagement studio) as well as BIDS.

    1) If you are using SSMS then browse cube till partition level, right clickproperties and select "Proactive Caching".

    2) If you are using BIDS solution then open Partition tab, select one partition andclick "Storage Settings".

    There are Standard "Storage Settings" which enables Proactive Caching withpredefined values of few parameters(Slice Interval, Slice Override interval,rebuildinterval etc.) which will be described below:

    Different Standard Storage Settings:

    1. Real time ROLAP2. Real Time HOLAP3. Low Latency MOLAP

    http://learnmicrosoftbi.blogspot.com/2010/09/analysis-services-storage-modes.htmlhttp://1.bp.blogspot.com/_ntCExJSVw8o/TKwlRKYCRrI/AAAAAAAAMWc/hJxrK4P2eko/s1600/PC_SC.JPGhttp://learnmicrosoftbi.blogspot.com/2010/09/analysis-services-storage-modes.html
  • 7/30/2019 13.Proactive Caching

    5/8

    4. Medium Latency MOLAP5. Automatic MOLAP6. Scheduled MOLAP7. MOLAP

    Different Parameters and their explanation:

    Cache Settings:

    1. Silence Interval2. Silence Override Interval3. Latency4. Rebuild Interval

    Options:1. Bring Online Immediately2. Enable ROLAP Aggregation3. Apply Settings to DimensionFor example, Consider different parameter settings ofLow Latency MOLAPoption mentioned in below screen shot:

    1) Silence Interval:

    For "Low Latency MOLAP", Silence Interval has been set 10 seconds. Wheneverrelational database change happens and notification comes to Analysis Server.

    http://3.bp.blogspot.com/_ntCExJSVw8o/TKwnuetjLKI/AAAAAAAAMWg/MMJ4XTkgWCo/s1600/PC_LLM.JPG
  • 7/30/2019 13.Proactive Caching

    6/8

    Silence Interval start its stopwatch and if no other Database changes comesbefore 10 seconds then it will start reprocessing cube with new changes. If newdatabase changes comes

  • 7/30/2019 13.Proactive Caching

    7/8

    Storage

    Mode

    Enable

    Proactive

    Caching

    Silence

    Interval

    Silence

    Override

    Interval

    Latency Rebuild

    Interval

    Bring Online

    Immediately

    MOLAP MOLAP No

    Scheduled

    MOLAPMOLAP Yes 1 Day

    Automatic

    MOLAPMOLAP Yes 10 Sec 10 Min

    Medium Latency

    MOLAPMOLAP Yes 10 Sec 10 Min 4 hours Selected

    Low Latency

    MOLAPMOLAP Yes 10 Sec 10 Min 30 Min Selected

    Real Time

    HOLAPHOLAP Yes 0 Sec 0 Sec Selected

    Real Time

    ROLAPROLAP Yes 0 Sec Selected

    One more important aspect, Notifications Services needs to be specified beforewe are done with proactive caching implementation.

    There are three types of notification services available in analysis services:

    1. SQL Server2. Client Initiated3. Scheduled Polling

  • 7/30/2019 13.Proactive Caching

    8/8

    1) SQL Server Notification: Once this option is selected then SQL Server2005 notification services will be used to identify changes in underlying table. Wecan specify table names under "Specify Tracking Tables". If table names has notbeen mentioned then SSAS tries to find out relevant tables by its own.

    2) Client Initiated Notifications: This option is usually selected when youare planning to use client based notification process.

    3) Scheduled Polling Notifications:This option tries to identify changes by

    running SQL Queries mentioned in "Polling Query", "Processing Query" fields.

    Proactive caching is mostly useful in which UDM is based on OLTP data and hasrequirement of low latency. In Data warehouse and Data Mart, data will be pulledin specified time(ETL batch processing) then Proactive caching doesn't givemuch, i will prefer to use other option (SSIS based solution) to pull the data.

    http://4.bp.blogspot.com/_ntCExJSVw8o/TKxTlYkJGDI/AAAAAAAAMWk/AfVCy7cz0yg/s1600/PC_NOTIFICATION.JPG