Refreshing Cubes
The REFRESH CUBE statement refreshes the local cube by clearing the local cube file or cache and rebuilding it from the original data source. Refreshing a cube is also referred to as recalculation. The syntax of REFRESH CUBE is specified in Appendix A.
-
If Microsoft® PivotTable® Service is connected to a Microsoft OLAP Server, the REFRESH CUBE statement causes the local memory cache to be cleared. The local cache is incrementally refreshed as queries are executed against the cube on the server.
-
If Microsoft PivotTable Service is connected to a relational database, executing the REFRESH CUBE statement causes the local memory and disk cache to be cleared and the dimensions repopulated.
-
If Microsoft PivotTable Service is connected to a local cube, executing the REFRESH CUBE statement clears the cube file and performs CREATE CUBE and INSERT INTO statements to recreate the cube from the original source database.
-
Recalculation of a cube may also be initiated by the server when Microsoft PivotTable Service is connected to a Microsoft OLAP Server. In this case, the Microsoft OLAP Server updates the data and notifies Microsoft PivotTable Service on the client to refresh the client's cache. This notification is done automatically during the next available communication initiated by the client. Also, all of the client caches are erased and opened queries (OLE DB for OLAP datasets) are recalculated. The LAST_UPDATED column of the cube changes the time stamp.
It is the client application's responsibility to be aware of recalculation notifications. The recalculation of a cube may result in situations where queries are no longer valid since members used by original queries may no longer exist. It is the client application's responsibility to re-validate queries after a recalculation.