Powershell scripts to process dimensions and print SSAS DB info
November 9th, 2008 by Vidas MatelisPreviously, the majority of my scripting code was done either in the SSIS script component or in WSH. But now it is time to learn PowerShell as Microsoft included it with SQL Server 2008. I find that PowerShell has its own specific requirements – like restrictive Execution Policy or the need to load a namespace definition. I have a document where I posted my findings and links to useful PowerShell resources. I’ll keep updating that document as I learn PowerShell myself, so make sure you check it when you begin to use PowerShell.
So here are my first 3 PowerShell scripts that I added to the SSAS-Info.com script library:
- A PowerShell script to list info about all SSAS databases. This script goes through all databases from one specified SSAS instance and prints cube and measure group names with sizes and status. This script is very similar to the previously published Windows Scripting Host script.
- A PowerShell script to list info about one Analysis Services database. This script list more detail info about one Analysis services database – list of cubes, measure groups, dimensions and optionally partitions. This script is very similar to the previously published Windows Scripting Host (WSH) script.
- A PowerShell script to process all dimensions in one Analysis Services database. You can pass parameters to specify the process type (ex: ProcessFull, ProcessUpdate), or a parameter to specify if you want to do processing of each dimension in parallel (default) or by itself. You can also specify if you want to print the dimension status info before and/or after processing. This script is very similar to the previously published SSIS script.
Enjoy at your own risk. As always, your comments and suggestions are very welcome!
Posted in PowerShell, SSAS 2008 - Katmai | Comments Off on Powershell scripts to process dimensions and print SSAS DB info