Hi, friends, please look this:
dim tDatabase as Microsoft.AnalysisServices.DataBase
tDatabase=Mainform.AnalysisDB 'here to refer it to an object
tDatabase..Cubes(0).MeasureGroups(0).Measures.Add() 'here to add a measure
tDatabase..Cubes(0).Update(Microsoft.AnalysisServices.UpdateOptions.ExpandFull)
tDatabase.Process(Microsoft.AnalysisServices.ProcessType.ProcessUpdate)
I want to know if it's correct to use the ProcessType.ProcessUpdate option?
After adding/dropping a measure/KPI, what ProcessType need I use?
After update a dsv, what ProcessType need I use?
Thanks!
To the best of my knowledge processUpdate is only valid for dimensions (see http://msdn2.microsoft.com/en-us/library/ms345142.aspx)
If you add a measure you are changing the structure of the cube which will invalidate the cube, the easiest way to get the cube "fully operational" again would be to do a processFull. The same thing applies when removing a measure.
I don't think you need to do any processing for calculated measures or KPI's as these elements do not have storage structures associated with them.
As far as the DSV is concerned, it depends on the type of change you are making. Changing the DSV will not invalidate the cube structure as such. The DSV is an abstraction for the data source(s) of the cube. It depends on the type of changes you are making. If the data that comes out of the DSV is affected in any way, you would need to re-process the cube to get it to reflect these changes. More importantly, if you change data types or remove elements that other objects such as dimensions, partitions, measures etc. are dependant upon, then you would need to change those objects too and that would most likely require full re-processing.
|||Thank you Gosbell ,
Please tell me if I drop or add a measure, if I always need to ProcessFull?
As you know, ProcessFull will take a very long time, specially when the cube is huge. I don't think the client could stand the long time just because he/she add or delete a measure thourgh my application with AMO.
How to deal with this problem?
|||
Please tell me if I drop or add a measure, if I always need to ProcessFull?
Yes, you do. You can add and remove calculations easy enough, but adding and removing measures that are linked to fact table columns changes the fundamental data structures. Adding and removing measures to a measureGroup is not really something to be done lightly, especially once a large cube has been deployed.
The bare minimum that you could do to get the cubes "queryable" again would be a processStructure followed by a processData, but the cubes would not have any indexes or aggregations, so they could be quite slow. Doing a processIndex would add the indexes and aggregations, but processFull is the effectively the same as doing all three of these operations individually. You might see a slight performance advantage by doing the three operations individually, but it would not be a dramatic change.
|||I see that. Thanks again, Gosbell!
No comments:
Post a Comment