Processing an SSAS cube
In this recipe, we will process an SSAS cube.
Getting ready
Choose a cube that is readily available in your SSAS instance.
How to do it...
Let's explore the code required to process an SSAS cube:
- Open PowerShell ISE as an administrator.
- Import the
SQLASCmdlets
module as follows:#import SQLASCmdlets module Import-Module SQLASCmdlets -DisableNameChecking
- Add the following script and run it:
$instanceName = "localhost" Invoke-ProcessCube -Name "AW" -Server $instanceName -Database "AWDW" -ProcessType ([Microsoft.AnalysisServices.ProcessType]::ProcessFull)
To check whether the cube has been processed, perform the following steps:
- Go to Management Studio and connect to SQL Server Analysis Services. Right-click on the cube you just processed and go to Properties:
- In the General section, check the Last Processed value. It should be updated to when the script finished executing, as shown in the following screenshot:
How it works...
Processing, or reprocessing...