How to Process Dimensions in Parallel using AMO

Processing objects in parallel is a great advantage and is one of my favorite features of SSAS2005. You could do it in AS2000 using the PPU (Parallel Process Utility), however it was a pain in the behind and had it’s problems.
Using AMO and VB.NET we were able to get processing time for our dimensions from eleven minutes down to eight. Being we prcoess every hour this is quite a gain since the users are able to get their data three minutes faster. Processing the dimensions for our daily cubes in parallel rather than serially is saving us an hour every night. Big difference!
It does have it’s drawbacks. Since processing in parallel involves more CPU cycles, queries during that time will resolve slower. 
AMO and VB.NET Sample Code

Dim oDimension As CubeDimension
Dim Results As XmlaResultCollection
Dim Result As XmlaResult
Dim Message As XmlaMessage

‘Start capture mode
objServer.CaptureXml = True

‘Capture XML
For Each oDimension In objCube.Dimensions
Next oDimension

‘Exit capture mode
objServer.CaptureXml = False

‘Execute and log the results
Results = objServer.ExecuteCaptureLog(True, True)

Log the errors and warnings
For Each Result In Results
    For Each Message In Result.Messages
        If Message.GetType.Name = "XmlaError" Then
            The processing failed
            It’s just a warning
        End If
    Next Message
Next Result

This entry was posted in Uncategorized. Bookmark the permalink.

1 Response to How to Process Dimensions in Parallel using AMO

  1. Luiz says:

    Thank you, this is very helpful, I am able to process all dimensions and specific partitions all in parallel using this mechanism, works like a charm 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s