So I came up with the following VBS script. It's quick and dirty but it works.
'CubeStatus.vbs
ServerName = "LocalHost"
'Delimiter = Chr(9) 'Tab
Delimiter = ";"
Set dsoServer = CreateObject("DSO.Server")
'Connect Analysis server
dsoServer.Connect ServerName
'Walk through OLAP DBs
For Each dsoDB In dsoServer.MDStores
'Walk through Cubes.
For Each dsoCube In dsoDB.MDStores
State = "Other"
If dsoCube.State = 0 Then
State = "OFFLINE"
ElseIf dsoCube.State = 4 Then
State = "Online"
End if
Wscript.Echo dsoDB.Name & Delimiter & dsoCube.Name & Delimiter & State
Next
Next
To run it use the command below:
cscript /NoLogo CubeStatus.vbs
And this could be the result
FoodMart;expenses;OFFLINE
FoodMart;Inventory;Online
No comments:
Post a Comment