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

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

  •  28-10-2019
  •  | 
  •  

Pergunta

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

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top