Partager via


AggregationUsage (Dimension Interface)

ms133852.note(fr-fr,SQL.90).gifRemarque :
  Cette fonctionnalité sera supprimée dans la prochaine version de Microsoft SQL Server. Évitez d'utiliser cette fonctionnalité dans de nouveaux travaux de développement, et modifiez dès que possible les applications qui utilisent actuellement cette fonctionnalité.

The AggregationUsage property of the Dimension interface specifies how aggregations are to be designed for the dimension levels.

Applies To:clsCubeDimension, clsPartitionDimension

Data Type

DimensionAggUsageTypes

Access

Access depends on the value of the ClassType property of the object.

Class type Access

clsCubeDimension

R/W

clsPartitionDimension

R

Notes

When aggregations are designed for a dimension, the value of this property determines which levels of a dimension may have aggregations created for them. The following table describes how the value of this property affects the consideration of levels for aggregation.

Aggregation usage Description

dimAggUsageCustom

Aggregations are created only for those levels whose EnableAggregations property is set to True.

dimAggUsageDetailsOnly

Aggregations are created only for the lowest level in the dimension.

dimAggUsageStandard

All levels are considered by the aggregation design algorithm.

dimAggUsageTopOnly

Aggregations are created only for the top (All) level.

dimAggUsageTopAndDetailsOnly

Aggregations are created only for the top (All) and lowest levels in the dimension.

ms133852.note(fr-fr,SQL.90).gifRemarque :
For virtual dimensions, AggregationUsage is read-only and automatically set to dimAggUsageStandard. An error is raised if you attempt to set this property on a virtual dimension.

Exemple

The following example changes the aggregation behavior of the Product dimension for the Sales cube in the FoodMart 2000 database to create aggregations only for the topmost level, and then it updates and reprocesses the Sales cube:

    Dim dsoServer As New DSO.Server
    Dim dsoDB As DSO.MDStore
    Dim dsoCube As DSO.MDStore
    Dim dsoDim As DSO.Dimension
        
    ' Connect to local Analysis server.
    dsoServer.Connect "LocalHost"
    
    ' Open FoodMart 2000 database.
    Set dsoDB = dsoServer.MDStores("FoodMart 2000")

    ' Open the Sales cube.
    Set dsoCube = dsoDB.MDStores("Sales")
    
    ' Open the Product dimension in the Sales cube.
    Set dsoDim = dsoCube.Dimensions("Product")
    
    ' Set the dimension to create aggregations only
    ' for the topmost (or All) level.
    dsoDim.AggregationUsage = dimAggUsageTopOnly
    
    ' Update the cube.
    dsoCube.Update
    
    ' Process the cube.
    dsoCube.Process processFull
        
    ' Clean up.
    Set dsoDim = Nothing
    Set dsoCube = Nothing
    Set dsoDB = Nothing
    dsoServer.CloseServer
    Set dsoServer = Nothing

Voir aussi

Référence

Dimension Interface
EnableAggregations (Level Interface)

Aide et Informations

Assistance sur SQL Server 2005