1

I connected to a particular server in c# using xmlaClient object. Now i want to list out the all databases in that particaular server. how to implement that. Please help me.

Thanks

Mihir
  • 8,696
  • 18
  • 56
  • 87

1 Answers1

1

You can use the discover method with the connection object. the code snippet as follows

XmlaClient xmlConn = new XmlaClient();
xmlConn.Discover("DBSCHEMA_CATALOGS", "", "", out outParam, false, false, false);

it gives all the list of databases in a xml format. now you can retrieve databases in that xml by using the linq to xml concepts.

Searcher
  • 1,845
  • 9
  • 32
  • 45