Configuring SQL Server 2008 R2 Change Data Capture with SSAS

  • I'm completely new to SSAS so you'll have to excuse my ignorance. I've been running through the MSDN SSAS tutorial to try and get a handle on how to use SSAS, such is my knowledge.

    Our business scenario is this: We have SSRS reports conigured to show a users login history over a given time period. There is a table which has the user id and login time. This is joined to the user management table to display details about the user on the report. However, this is not true point in time reporting as the user details may have changed over that time period, their surname for example. We are not using SSAS at the moment. We do have other, more complicated, requirements but this is a good example to begin with.

    As a solution I want to enable SQL Server 2008 CDC on the user management table, pull this data into the reporting database, then transform it into a data warehouse for faster searching.

    Firstly, is SSAS the way to go? I could write SQL to get the latest user record for each login, however, it's a little fiddly (especially in queries that have multiple joins) and I don't want to reinvent the wheel if some technology already does that, possibly faster.

    If SSAS is indeed the way to go how would I go about achieving this? Has anyone out there already implemented this solution and what did you do?

    I've been looking for books or any forum posts and can't find any information on this specific requirement, including emailing people at Kimball. I really need an idiots guide.

    Any help would be much appreciated.

    Thanks,

    Mat

  • If I understand correctly, your requirement is a transactional report showing login records between a date range.

    I didn't quite follow if it should also display either the latest user details associated with the records within that time frame, or each login record displays the user details at that time.

    Either way SSAS does not tend to be great for transactional reports. It is designed for analytics, like if you wanted to show number of logins during a period, average time logged in per month, number of failed login attempts, etc.

    However, making your user table a slowly changing dimension (SCD type 2) does seem to architecturally make sense to meet the requirement.

    This would simply mean adding a surrogate key to your user table (that becomes the new primary key) and effective from and to dates. Then login attempts are associated with the user record at the time instead.

    I would look into dimensional modeling and ETL tools that help you maintain a slowly changing dimension.

  • Thanks for the info Daniel. I think I'll not reseach SSAS any further.

    I'm going to:

    1. Configure CDC

    2. Use SSIS to import the changes into history tables in the reporting database

    3. Calculate the start and end date for each change

    4. Build reporting tables off this history information

    5. Query the reporting tables in SSRS

    Simples!

  • Surrogate keys are a great way to keep track of multiple instances of the same entity (product, person, ...). You can add a validFrom and validTo date fields to also know when that instance was in existence. The latest instance will have the validTo be NULL.

    Best

    ----------------------------------------------------

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply