Uncategorized

Clear cube or dimesion cache

Transact-SQL <!--Database--> <Batch xmlns = "http://schemas.microsoft.com/analysisservices/2003/engine"> <ClearCache> <Object> <DatabaseID>TestDW</DatabaseID> </Object> </ClearCache> </Batch> <!--Measure group--> <Batch xmlns = "http://schemas.microsoft.com/analysisservices/2003/engine"> <ClearCache> <Object> <DatabaseID>TestDW</DatabaseID> <CubeID>TestCube</CubeID> <MeasureGroupID>Sales</MeasureGroupID> </Object> </ClearCache> </Batch> <!--Dimension--> <Batch xmlns = "http://schemas.microsoft.com/analysisservices/2003/engine"> <ClearCache> <Object> <DatabaseID>TestDW</DatabaseID> <DimensionID>Dim Customer</DimensionID> </Object> </ClearCache> </Batch> 1234567891011121314151617181920212223242526272829 <!--Database--><Batch xmlns = "http://schemas.microsoft.com/analysisservices/2003/engine">  <ClearCache>    <Object>      <DatabaseID>TestDW</DatabaseID>    </Object>  </ClearCache></Batch> <!--Measure group--><Batch xmlns = "http://schemas.microsoft.com/analysisservices/2003/engine">  <ClearCache>    <Object>      <DatabaseID>TestDW</DatabaseID>      <CubeID>TestCube</CubeID>      <MeasureGroupID>Sales</MeasureGroupID>    </Object>  </ClearCache></Batch> <!--Dimension--><Batch xmlns = "http://schemas.microsoft.com/analysisservices/2003/engine">  <ClearCache>    <Object>      <DatabaseID>TestDW</DatabaseID>      <DimensionID>Dim Customer</DimensionID>    </Object>  </ClearCache></Batch>
Uncategorized

Closing SSAS connection

Transact-SQL SELECT * FROM $SYSTEM.DISCOVER_COMMANDS GO SELECT * FROM $SYSTEM.DISCOVER_SESSIONS GO SELECT * FROM $SYSTEM.DISCOVER_CONNECTIONS GO <Cancel xmlns="http://schemas.microsoft.com/analysisservices/2003/engine"> <ConnectionID>100</ConnectionID> </Cancel> 12345678910 SELECT * FROM $SYSTEM.DISCOVER_COMMANDSGOSELECT * FROM $SYSTEM.DISCOVER_SESSIONSGOSELECT * FROM $SYSTEM.DISCOVER_CONNECTIONSGO <Cancel xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">  <ConnectionID>100</ConnectionID></Cancel>