SSAS: I need to write a tool in c# to export/import database structure in xmla file. User specifies name of existing database for export and new database for import. I consider Analysis Management Objects (AMO) to use, and I found a method for database creation, but found no way to export its structure in AMO object model, nothing helpful in Database
object. In MsSQL Management Studio I can click on database and choose "Script Database As -> CREATE To" in popup menu. How to do the same thing in c# code and how then run xmla to create new Db structure? If there is no easy way to do that with AMO, alternative solutions are very welcomed.
Finally I've found answer here: http://social.msdn.microsoft.com/Forums/en-US/sqlanalysisservices/thread/d11d614f-2b49-4cca-a842-c6eed16a7cec/
I have to use Scripter
object for that.