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

‘Variables
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
    oDimension.Dimension.Process(ProcessType.ProcessUpdate
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
        Else
            It’s just a warning
        End If
    Next Message
Next Result

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

One 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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s