Mihir
Mihir

Reputation: 8734

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

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

Upvotes: 1

Views: 843

Answers (1)

Searcher
Searcher

Reputation: 1855

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.

Upvotes: 1

Related Questions