OpenQueryLogRecordset (clsCubeAnalyzer)
Note
This feature will be removed in the next version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible.
The OpenQueryLogRecordset method of an object of ClassType clsCubeAnalyzer returns a Microsoft® ActiveX® Data Objects (ADO) recordset containing a record for each analysis query run on the Analysis server that satisfies the given SQL query.
Syntax
Set ADODBRecSet = object.OpenQueryLogRecordset(SQLString As String)
Parameters
- ADODBRecSet
An ADODB recordset.
- object
The object of ClassType clsCubeAnalyzer used.
SQLString
The SQL query that returns the query log recordset. You can create an SQL statement using any of the fields in the query log. For example:"SELECT * FROM QueryLog WHERE Duration > 5"
The following columns are returned in ADODBRecSet. The ADO data types specified for each column can be found in the ADODB.DataTypeEnum enumeration. For more information about the ADO data types, see the ADO documentation.
Column | ADO data type | Description |
---|---|---|
MSOLAP_Database |
adVarWChar |
The name of the database used in the query |
MSOLAP_Cube |
adVarWChar |
The name of the cube used in the query |
MSOLAP_User |
adVarWChar |
The name of the user that ran the query |
Dataset |
adVarWChar |
A numeric string indicating the level from each dimension used to satisfy the query |
Slice |
adVarWChar |
A string indicating the data slice for the query. |
StartTime |
adDate |
The time the query began |
Duration |
adInteger |
The length of time (in seconds) of the query execution |
MOLAPPartitions |
adSmallInt |
The number of different multidimensional OLAP (MOLAP) partitions that were used to satisfy the query |
ROLAPPartitions |
adSmallInt |
The number of different relational OLAP (ROLAP) partitions that were used to satisfy the query |
SamplingRate |
adInteger |
The sampling rate at the time the query was executed |
Remarks
In order to create an instance of the ADODB Recordset object, you must add the Microsoft ActiveX Data Objects reference to your Microsoft Visual Basic® project.
The Dataset column is of particular interest for designing aggregations. The values in the Dataset column can be used when calling the AddGoalQuery method of the clsPartitionAnalyzer object to construct goal queries. Goal queries are used to fine-tune the process of aggregation design for a partition.
See Also
Reference
clsCubeAnalyzer
clsPartitionAnalyzer