Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Configuring SQL Server 2008 R2 Change Data Capture with SSAS Expand / Collapse
Author
Message
Posted Wednesday, September 19, 2012 3:10 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, October 13, 2014 3:32 AM
Points: 204, Visits: 653
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
Post #1361212
Posted Wednesday, September 19, 2012 9:36 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Sunday, July 20, 2014 9:25 PM
Points: 36, Visits: 395
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.
Post #1361712
Posted Friday, September 21, 2012 3:22 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Monday, October 13, 2014 3:32 AM
Points: 204, Visits: 653
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!
Post #1362502
Posted Friday, September 21, 2012 2:46 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, October 17, 2014 12:20 PM
Points: 373, Visits: 909
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
Post #1362997
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse