I have a user asking me to list the dimensions and dimension attributes of our SSAS cube.
I susspect I could generate this via AMO, but I'm wondering if there's an MDX query or SSMS option to show the same info.
Any ideas?
I have a user asking me to list the dimensions and dimension attributes of our SSAS cube.
I susspect I could generate this via AMO, but I'm wondering if there's an MDX query or SSMS option to show the same info.
Any ideas?
Here's a script via AMO
[Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices") | Out-Null
$server = new-Object Microsoft.AnalysisServices.Server
$server.Connect($serverName)
foreach ($db in $server.Databases)
{
Write-Host $db.Name
foreach ($cb in $db.Cubes)
{
Write-Host "`t" + $cb.Name
foreach ($dm in $cb.Dimensions)
{
Write-Host "`t`t" + $dm.Name
foreach ($at in $dm.Attributes)
{
Write-Host "`t`t`t" + $at.Attribute
}
}
}
}