Multidimensional schema rowsets can be browsed by the IDBSchemaRowset interface. Consumers can get information about the available cubes, dimensions, hierarchies, levels, members, and member properties. Because IDBSchemaRowset is an interface on the session object, the consumer needs to 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 Catalog and schema 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, then the CUBES rowset has five rows. Each column of a schema rowset gives one piece of information about that object. For example, the CUBES rowset has the following 11 columns, each of which gives 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. |
Often it is not 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 the dimensions available in the schema. Thusm there must be a way to restrict a schema rowset based on certain conditions.
OLE DB defines a generic method to accomplish this, called restrictions. Each schema rowset has a defined set of restrictions. The restrictions are typically conditions on one of the columns of a schema rowset. For example, the DIMENSIONS rowset can be restricted by the CATALOG_NAME, SCHEMA_NAME, CUBE_NAME, DIMENSION_NAME, and DIMENSION_UNIQUE_NAME properties. 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 only contain dimensions belonging to a particular cube, the application puts the cube name into element number three of the restrictions array.
For more information on restrictions in OLE DB, see the OLE DB Programmer’s Reference. For more information on restrictions in OLE DB for OLAP schema rowsets, see “Session Object” in Chapter 4 of this document.