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...
Open the PowerShell console by going to Start | Accessories | Windows PowerShell | Windows PowerShell ISE.
Import the
SQLASCMDLETS
module as follows:#import SQL Server module Import-Module SQLASCMDLETS -DisableNameChecking
Add the following script and run:
$instanceName = "KERRIGAN" Invoke-ProcessCube -Name "AW" -Server $instanceName -Database "SampleDW" -ProcessType ([Microsoft.AnalysisServices.ProcessType]::ProcessFull)
To check that the cube has been processed:
Go to Management Studio and connect to SQL Server Analysis Services.
Right-click on the cube you've 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, a cube is a common task that needs to be done in...