OpenQueryLogRecordset (clsCubeAnalyzer)

ms133407.note(zh-cn,SQL.90).gif注意:
  下一版本的 Microsoft SQL Server 将删除该功能。请不要在新的开发工作中使用该功能,并尽快修改当前还在使用该功能的应用程序。

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.

语法

Set ADODBRecSet = object.OpenQueryLogRecordset(SQLString As String)

参数

  • 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

备注

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.

请参阅

参考

clsCubeAnalyzer
clsPartitionAnalyzer

帮助和信息

获取 SQL Server 2005 帮助