Commands
A command is administrator-defined and is automatically executed when a client accesses a database, cube, or role. Although the term command is frequently used in a general sense, in this topic it refers to the command object, which is used in Analysis Services for specific purposes.
Commands are optional, but they are commonly used to enhance cubes.
You can create commands that enable end users to perform additional operations on cubes or to enrich or customize their experience in a client application. For example, you can create a type of command called an action, which allows end users to select a part of a cube and initiate an operation on it. For example, they can open their Internet browsers to display information about a particular member. Or you can create another type of command called a calculated member, which adds to a cube a customized member derived from an expression.
Commands can be defined for databases, cubes, database roles, and cube roles. Commands are immediately subordinate to these four objects. Commands defined for databases are called database commands. You must create and maintain database commands programmatically by using Decision Support Objects (DSO). Commands defined for cubes are called cube commands. You can create and maintain cube commands in Analysis Manager. You can also create and maintain cube commands programmatically by using DSO. Commands defined for database roles or cube roles are called role commands. They offer the flexibility of limiting commands to specific roles. You must create and maintain role commands programmatically by using the DSO.
A command is executed when an end user accesses a database, cube, database role, or cube role using a client application. Any of these actions trigger database commands defined for the database. Access to a cube occurs when any end user browses the cube or accesses its meta data. This action triggers various cube commands defined for the cube. Access to a database role occurs when an end user belonging to the database role accesses the database associated with the database role. This action triggers role commands defined for the database role. Access to a cube role occurs when an end user in the cube role browses the cube associated with the cube role. This action triggers role commands defined for the cube role.
You can create several types of commands, which are described in the following table. All of these types can be created as cube commands by using either Cube Editor for regular cubes or Virtual Cube Editor for virtual cubes.
Note Within a cube, commands such as actions, calculated members, or named sets cannot share the same name. Each command must have a unique name.
Command type | Description |
For more information, see |
---|---|---|
Action | An end user-initiated operation upon a selected cube or portion of a cube. The operation can open an application with the selected item as a parameter or retrieve information about the selected item. | Actions |
Calculated member | A dimension member whose value is calculated at run time using an expression that you specify when you define the calculated member. | Calculated Members |
Named set | A set of dimension members or a set expression that is created for reuse, for example, in Multidimensional Expressions (MDX) queries. | Named Sets |
Library registration | A registration of a file containing one or more functions for use in MDX. | Library Registrations |