Partilhar via


Accessing Query Context in Stored Procedures (Analysis Services)

The execution context of a stored procedure is available within the code of the stored procedure as the Context object of the ADOMD.NET server object model. This is a read-only context and cannot be modified by the stored procedure. The following properties are available on this object.

Property Type Description

CurrentCube

Cube

The cube for the current query context.

CurrentTuple

Tuple

The tuple consisting of the current member on every hierarchy.

CurrentDatabaseName

String

The identifier of the current database.

CurrentConnection

Connection

Pass

Integer

The pass number for the current context.

The Context object exists when the Multidimensional Expressions (MDX) object model is used in a stored procedure. It is not available when the MDX object model is used on a client. The Context object is not explicitly passed to or returned by the stored procedure. It is available during the execution of the stored procedure.

See Also

Concepts

Assemblies (Analysis Services)
Working with Stored Procedures (Analysis Services)

Help and Information

Getting SQL Server 2005 Assistance