How to get the list of databases in an analysis services using xmlaclient in c#

StackOverflow https://stackoverflow.com/questions/9356471

  •  28-10-2019
  •  | 
  •  

سؤال

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

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top