MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 21: OLE DB for OLAP Concepts
Consumers can get information about the available cubes, dimensions, hierarchies, levels (including level properties), members, and member properties by using the IDBSchemaRowset interface to browse. Because IDBSchemaRowset is an interface on the session object, the consumer must have a session object before it can browse for metadata.
OLE DB for OLAP defines schema rowsets for the following metadata objects:
Note OLE DB for OLAP rowsets for catalogs and schemas are the same as for OLE DB.
Each schema rowset is identified by a GUID. IDBSchemaRowset::GetRowset takes this GUID as an argument and returns the requested schema rowset.
A schema rowset for a given metadata object has one row for every instance of that object present in the schema. For example, if there are five cubes available in the schema, the CUBES rowset has five rows. Each column of a schema rowset provides one piece of information about that object. As shown in the following table, the CUBES rowset has 11 columns, each of which provides a different piece of information about the cube.
Column name | Information conveyed about the cube |
CATALOG_NAME | Name of the catalog to which this cube belongs. |
SCHEMA_NAME | Name of the schema to which this cube belongs. |
CUBE_NAME | Name of the cube. |
CUBE_TYPE | Indicates either a regular cube or a virtual cube. |
CUBE_GUID | Cube GUID. |
CREATED_ON | Date and time of cube creation. |
LAST_SCHEMA_UPDATE | Date and time of last schema update. |
SCHEMA_UPDATED_BY | User ID of the person doing the last schema update. |
LAST_DATA_UPDATE | Date and time of last data update. |
DATA_UPDATED_BY | User ID of the person doing the last data update. |
DESCRIPTION | A meaningful description of the cube. |
It is not always desirable to retrieve information about all instances of a metadata object. For example, an application typically needs the dimensions belonging to a single cube, rather than all dimensions available in the schema. Therefore, OLE DB defines a generic method to restrict a schema rowset based on certain conditions, called restrictions. Each schema rowset has a defined set of restrictions, which are typically conditions on one column of a schema rowset. For example, the DIMENSIONS rowset can be restricted by the following properties: CATALOG_NAME, SCHEMA_NAME, CUBE_NAME, DIMENSION_NAME, and DIMENSION_UNIQUE_NAME.
One of the arguments to IDBSchemaRowset::GetRowset is an array of restrictions. This array has as many elements as the number of restrictions on the particular schema object. For example, the number of restrictions on the DIMENSIONS schema rowset is five. To restrict the DIMENSIONS rowset to contain only dimensions belonging to a particular cube, the application puts the cube name into the third element of the restrictions array.
For more information about restrictions in OLE DB for OLAP schema rowsets, see "Session Object" in Chapter 22, "OLE DB for OLAP Objects and Schema Rowsets."