clsCubeAnalyzer

ms132796.note(de-de,SQL.90).gifHinweis:
  Dieses Feature wird in der nächsten Version von Microsoft SQL Server entfernt. Verwenden Sie dieses Feature nicht zum Entwickeln neuer Anwendungen, und planen Sie das Ändern von Anwendungen, in denen es zurzeit verwendet wird, zum frühstmöglichen Zeitpunkt ein.

A Decision Support Objects (DSO) object of ClassType clsCubeAnalyzer contains a single method used to extract information from the query log. The query log stores the descriptions of queries executed on the Analysis server. This object provides a method through its own internal interface.

There are no collections or properties associated with an object of ClassType clsCubeAnalyzer.

Examples

Retrieving the Cube Query Log

The following code example retrieves the entire contents of a cube's query log from the Analysis server and prints the number of records in the immediate window:

Option Explicit

Public dsoServer As DSO.Server
Public dsoDB As DSO.MDStore
Public dsoCube As DSO.MDStore
Public dsoCubeAnalyzer As DSO.CubeAnalyzer
Public ADODBRecSet As ADODB.Recordset

Public Sub AnalyzeCube()
    If dsoServer Is Nothing Then
       Set dsoServer = New DSO.Server
         'MyServer is the name of the Analysis server.
         dsoServer.Connect ("MyServer")
    End If
    
    'Get first database from server.
    Set dsoDB = dsoServer.MDStores(1)
    
    'Get first cube from database.
    Set dsoCube = dsoDB.MDStores(1)
    
    'Get analyzer object from cube.
    Set dsoCubeAnalyzer = dsoCube.Analyzer
    
    'Get recordset from log.
    Set ADODBRecSet = dsoCubeAnalyzer.OpenQueryLogRecordset _
      ("SELECT * FROM QueryLog")
      
    If ADODBRecSet.BOF And ADODBRecSet.EOF Then
        Debug.Print "<<No records in query log>>"
    Else
        ADODBRecSet.MoveLast
       Debug.Print "   Record count: " & ADODBRecSet.RecordCount
    End If
End Sub
 

Siehe auch

Verweis

Methods, clsCubeAnalyzer

Hilfe und Informationen

Informationsquellen für SQL Server 2005