We recommend using Visual Studio 2017

Context Class

Provides the execution context for the stored procedure.


Namespace:  Microsoft.AnalysisServices.AdomdServer
Assembly:  msmgdsrv (in msmgdsrv.dll)

public sealed class Context

The Context type exposes the following members.

Public methodContextInitializes a new instance of the Context class.

Public propertyStatic memberClientCultureInfoGets the culture for the current client.
Public propertyStatic memberCubesGets a collection of cubes that are available in the current database or context.
Public propertyStatic memberCurrentConnectionGets the current connection.
Public propertyStatic memberCurrentCubeGets the current cube.
Public propertyStatic memberCurrentDatabaseNameGets the current database name for the current session.
Public propertyStatic memberCurrentMiningModelGets the current mining model.
Public propertyStatic memberCurrentServerIDGets the server identifier (server\instance) for the current session.
Public propertyStatic memberExecuteForPrepareGets a value that indicates whether the stored procedure is being called for preparation purposes.
Public propertyStatic memberMiningModelsGets the mining models in the current database.
Public propertyStatic memberMiningServicesGets the mining services in the current database.
Public propertyStatic memberMiningStructuresGets the mining structures in the current database.
Public propertyStatic memberPassGets the pass number that the user-defined function (UDF) or stored procedure is running under.
Public propertyStatic memberServerGets the server object.

Public methodStatic memberCheckCancelledThrows an exception if the query has timed out or been canceled by the user.
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)
Public methodStatic memberTraceEventRaises a trace event with the specified information.

The Context object provides a set of static properties that enable stored procedures to obtain the current execution context. All Microsoft.AnalysisServices.AdomdServer metadata objects can be obtained through the Context object, and are read-only.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.