Is there any way to get Tabular cube usage statistics report?

Prabu, Chandran 41 Reputation points
2023-05-30T15:17:02.8066667+00:00

I need to know one of the Tabular Cube usage details for the last month or so so that we are able to decommission it if it is not used.

 

So please tell me how to get the usage details.

SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,344 questions
SQL Server Other
{count} votes

1 answer

Sort by: Most helpful
  1. Vahid Ghafarpour 23,385 Reputation points Volunteer Moderator
    2023-05-30T16:58:37.08+00:00

    Depending on the version of Analysis Services you are using, you can use one of the following queries to gather usage information:

    • For SQL Server 2016 and later versions (Tabular Models):
    SELECT
      [CUBE_NAME] AS CubeName,
      [OBJECT_NAME] AS ObjectName,
      [QUERY_START_TIME] AS QueryStartTime,
      [ELAPSED_TIME] AS ElapsedTime
    FROM $SYSTEM.DISCOVER_SESSIONS
    WHERE [SESSION_START_TIME] >= DATEADD(MONTH, -1, GETDATE())
      AND [OBJECT_TYPE] = 'SESSION_CUBE'
    ORDER BY [QUERY_START_TIME] DESC
    

    This query retrieves information about the sessions and queries executed on the Tabular Cube in the last month. It provides details such as the Cube name, Object name (specific table or calculation), Query start time, and Elapsed time.

    • For earlier versions of Analysis Services (Multidimensional Models):
    SELECT
      [CUBE_NAME] AS CubeName,
      [SESSION_ID] AS SessionID,
      [REQUEST_COMMAND] AS RequestCommand,
      [START_TIME] AS StartTime,
      [ELAPSED_TIME] AS ElapsedTime
    FROM $SYSTEM.DISCOVER_SESSIONS
    WHERE [START_TIME] >= DATEADD(MONTH, -1, GETDATE())
      AND [REQUEST_TYPE] = 1 -- MDX Query
      AND [CUBE_NAME] = 'YourCubeName'
    ORDER BY [START_TIME] DESC
    
    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.