Search code examples
sql-server-2012ssasmdxxmlassas-tabular

Check is tabular model has loaded latest data


We've a few tabular models on 2012 server. We have queries running to find if the processing of these was successful and that's about it.

Most of the times processing is successful but it does not have the latest data.

Can I run some MDX XMLA to know if the data loaded is the latest data.

Thank you


Solution

  • Using DMV

    SELECT TOP 1 [LAST_DATA_UPDATE]FROM $System.MDSCHEMA_CUBESWHERE [catalog_name] = 'AdventureWorks Tabular Model SQL 2012'ORDER BY [LAST_DATA_UPDATE] DESC
    

    Using XMLA

    <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">    <RequestType>MDSCHEMA_CUBES</RequestType>    <Restrictions/>    <Properties>        <PropertyList>            <Catalog>YourCubeDatabaseName</Catalog>        </PropertyList>    </Properties></Discover>
    

    Here the LAST_DATA_UPDATE tag in the result contains the information about the last full process on the entire database.