Пример просмотра объектов базы данных
Dim myServer As New Server
myServer.Connect(«(local)»)
Dim databaseName As String
Dim db As Database
databaseName = «Adventure Works Sample»
db = myServer.Databases.Item(databaseName)
? Получение информации о Data Source
For Each myDataSource As DataSource In db.DataSources
    Console.WriteLine(«The Data Source name is « & myDataSource.Name)
Next
? Получение информации о Data Source View
For Each myDataSourceView As DataSourceView In db.DataSourceViews
    Console.WriteLine(«The Data Source View name is « &                myDataSourceView.Name)
Next
? Получение информации о кубах
For Each myCube As Cube In db.Cubes
    Console.WriteLine(«The cube name is « & myCube.Name)
Next
? Получение информации о размерностях
For Each myDim As Dimension In db.Dimensions
    Console.WriteLine(«The dimension name is « & myDim.Name)
Next
? Получение информации о модельных структурах 
For Each myMiningStruct As MiningStructure In db.MiningStructures
    Console.WriteLine(«The Mining Structure name is « & myMiningStruct.Name)
    For Each myMiningModel As MiningModel In myMiningStruct.MiningModels
        Console.WriteLine(« The Mining Model name is « & myMiningModel.Name)
    Next
Next
? Получение информации о ролях
For Each myRole As Role In db.Roles
    Console.WriteLine(«The role name is « & myRole.Name)
Next
? Получение информации о сборках
For Each myAssembly As Assembly In db.Assemblies
    Console.WriteLine(«The Assembly name is « & myAssembly.Name)
Next

Поделитесь материалом с коллегами и друзьями