Databases Reference
In-Depth Information
Different types of changes may happen to the objects, and the global and session scope
can withstand some changes. (For example, a change of dimension description won't
affect calculations.) When you incrementally process a partition, existing calculations
can continue to work, but results of MDX expressions might be different. For example,
the following code can return different results if transactions for today's sales are added
to the cube:
TopCount(CrossJoin([Customer].[Customer].Members, [Product].[Products].Members), 5,
[Measures].[Unit Sales])
On the other hand, if the dimension was reprocessed and some members were removed,
calculations that reference those members won't work and will return an error.
To support all these different scenarios, Analysis Services has a complex mechanism that
detects objects that were changed and the impact of that change, and informs the session
manager of the change. Depending on the type of the change, the session manager can
either rebuild the session scope or mark it as deleted. Figure 29.9 shows the mechanism of
refreshing session scopes.
When the session manager receives the request to update the sessions, it iterates over all
the sessions, and tries to refresh sessions that have scope for the changed cube in the
session scope cache. When a change of the cube is not severe, Analysis Services first
rebuilds the global scope by revaluating the MDX script and dimension calculations,
extracts the MDX expressions associated with every calculation in the session scope, and
reevaluates them.
If a cube is severely changed, the session manager iterates over all the sessions and checks
whether the session scope for the altered cube has at least one calculation. Such sessions
are marked as deleted, and when another user request comes to such a session, Analysis
Services returns error message: Current session is no longer valid due to struc-
tural changes in the database .
Building a Virtual Set Operation Tree
The results of an MDX query contain two major sections: axes definition and cells defini-
tion. After it completes parsing of a query, Analysis Services starts to evaluate the multidi-
mensional space covered by this query and produces first section of the results—axes
definition. Therefore, it iterates over the branch of the normalized tree associated with
each axes. Because axes in MDX are always defined by sets, we call the axis branch of a
normalized tree a virtual set operation tree.
NOTE
Analysis Services works with sets not only to define the multidimensional space of a
query, but also executes MDX expressions that contain sets in many other situations.
For example, in dimension security, named sets and MDX expressions are defined in
MDX scripts. A virtual set operation tree is also used in all these cases.
Search WWH ::




Custom Search