The Analysis Services Stored Procedure project is a set of sample stored procedures for Analysis Services 2005, 2008, 2008 R2, 2012, and 2014. These samples have been written in C# and sample MDX queries are included that demonstrate the use of the procedures against the Adventure Works DW sample database. It was developed by a group of community volunteers with 2 main aims in mind:

  • To provide a set of useful extensions to Analysis Services 2005 and higher.
  • To provide a variety of example source code for people looking to write their own stored procedures.

The project currently contains the following samples:

Class Permissions Version Functions
AsymmetricSet S 1.0 AsymmetricSet
CellTimings S 1.0 TimeToCalculate
ClusterNaming U 1.1 AutoNameClusters, DistinguishingCharacteristicsForClusters
CubeInfo U 1.0 GetMeasureGroupLastProcessedDate, GetLastProcessedDateOverPartitions
CurrentCommand U 1.3.7 CurrentCommandIsDiscover, GetCurrentCommand
DimensionHealthCheck U 1.1 DimensionHealthCheck
Discover U 1.1 Discover, DiscoverConnections, DiscoverSessions, DiscoverRowsets
Drillthrough   1.3 GetDefaultDrillthroughMDX, GetCustomDrillthroughMDX, ExecuteDrillthroughAndFixColumns, GetMeasureGroupCalculatedMeasures, CurrentCellAttributes
EfficientToDate S 1.0 EfficientToDate
FileSystemCache U 1.3 ClearAllCaches, ClearFileSystemCache
FindCurrenMembers S 1.0 FindCurrentMember, FindCurrentTuple
LinkMember S 1.1 HierarchyLinkMember, LevelLinkMember
ListFunctions U 1.1 AssemblyVersion, ListFunctions
MemoryUsage U 1.1 SnapshotMemoryUsageTotals
Multiplication S 1.0 Multiply
Parallel   1.1 ParallelGenerate, ParallelUnion
Partition U 1.1 CreatePartitions, CreateDistinctCountPartitions, CreateStringDistinctCountPartitions
PartitionHealthCheck U 1.2 DiscoverPartitionSlices
Percentiles S 1.3.7 ValueAtPercentile, RangePoint
SQLQuery U 1.3 ExecuteSql
SetOperations S 1.1 BottomCountWithTies, InverseHierarchility, TopCountWithTies, Order, RandomSample, ReverseSet, AsymmetricDrillDown
StrToSet S 1.2 KeysStrToSet, CompositeKeysStrToSet
StringFilters     IsLike, Like, RegExFilter
TraceEvent S 1.3.6 FireTraceEventAndReturnValue
XmlaDiscover U 1.1 CancelConnection, CancelSession, CancelSPID
XmlaDiscover U 1.1 ClearCache
XmlaDiscover U 1.2 DMV
XmlaDiscover U 1.3 DiscoverSingleValue, DiscoverXmlMetaDataSingleValue, DiscoverXmlMetaDataFullSingleData, DMVSingleValue
XmlaDiscover U 1.1 DiscoverXmlMetaData, DiscoverXmlMetaDataFull
XmlaDiscover U 1.3.7 ForEachPartition, ForEachMeasureGroup
XmlaDiscover U 1.1 XmlaDiscover

Permissions:

Denotes the minimum required permissions level for the function in the class to work. If you deploy the assembly with a lower permission level than that required by a given function, that function will simply throw a security exception when you attempt to execute it, all the other functions will execute normally.

  • S - Safe
  • U - Unrestricted

Version:

Denotes the initial release version for the class.

Installation

For details on how to install the compiled release see the Installation Instructions

Additional Resources

For a list of other resources and links see: