Wednesday, March 7, 2012

Deploying a SSAS solution from File location using C#

Hi all,
i have created a SSAS solution using BIDS . I have saved the project on local hard disk. Now i need to deploy the solution through C# and not use C#. Can i do that ? if how how?

Regards..
Girija Shankar

Could you describe your goals a bit more? When you create an SSAS solution with BIDS, a script file is created that can be used to deploy a database to SSAS. You could also use the ASCMD application to submit scripts or execute a script via AMO. (I believe the Server object's Execute method handles this.)

B.

|||

Hi Bryan,

Thanks for the reply. The scenario is as folows:

1. I create a SSAS solution. i create the datasource,DSv,cubes and dimensions and Roles.I donot deploy that to the server but save the file to a local drive location.

2. If i go to the local directory path where I saved the solution i will find files such as .database, .cube,.partitions, .dim etc

3. i need to deploy the full solution from this file location to the server. After deployement i can process the cubes one by one using AMO. The processing part is clear to me using AMO but how to deploy from file location i am not able to figure out . All this has to be done through code (C#).

Regards...

Girija Shankar

|||

So, the file in the BIN folder is a complete or near-complete script. You should be able to use standard techniques to read the file (it's just XML though I would read it as a simple text file). With the script in memory, you can then submit it as a string through the AMO Server object's Execute method.

You may also want to review the ASCMD project that comes with the SSAS samples. I believe it has the functionality built in to read a file and execute it like I'm describing. It's also written in C#.

B.

|||

Bryan,

There are four files in bin folder . i suppose i would be using .asdatabase file. read that,envolope that with the create and Object Tags and execute that on server. Is this correct?

Regards...

Girija Shankar

|||

Hi, Another question.

There are some read only tags such as CreatedTimestamp, should i remove them while reading that?

Regards...
Girija Shankar

|||Another option is to use the Deployment Wizard (launched from the Start menu under Microsoft SQL Server->Analysis Services). This wizard has the option to generate a deployment script which is just an XMLA

command that can be sent the the server to deploy and optionally process the cube. This script deployment can be done using Adomd.Net, an XMLA Query in SQL Management Studio, or using the ASCMD.exe command line utilility available at http://www.microsoft.com/downloads/details.aspx?familyid=e719ecf7-9f46-4312-af89-6ad8702e4e6e&displaylang=en.

No comments:

Post a Comment