Wednesday, March 7, 2012

Deploying a full database through XMLA and C#

Hi all,

I want to create , deploy and process the XMLA scripts for a full projectin SSAS . I want to do this through code C#. I have the XMLA's. I want the code to check wether the database exists and tehn drop it if it exists and create a new database , create and deploy and process the DSV, cubes and other objects one by one taking the XMLA. I also want to capture the log as to what happened , i mean wether it was sucessful or it threw an error.

Please give me some sample code as to how to go about it...

Regards...

Girija Shankar

Hi,

You can use AMO to check if the database exist, to drop it, to re-create it, to run XMLA scripts.

Sample code for running XMLA scripts with AMO:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=516930&SiteID=1

You mentioned that you want to drop the database if it exists and then re-create it. You can do that in a single step, the 'Create' command has the 'AllowOverwrite' parameter:

<Create AllowOverwrite='true'>

... the database definition here ...

</Create>

Adrian Dumitrascu

|||Hi Adrian,

Thanks for the answer. But I think you didnot get my question. I want to check in the server wether the database exists or not. if it exists i will drop that and take the xmla script from a specified location as a xmla file and then process it to cretae the necessary objects. then i process the cubes present in the Database one by one. Now the point is how do i check wether it exists and i want to catch the processing results ( wether success or failure). The XMLA will be a predifined file existing on local system.

Regards....
Girija Shankar

No comments:

Post a Comment