Wednesday, March 7, 2012

Deploying an Assembly in "Analysis Server" through Code

Hi,

I have a requirement wherein I have to deploy an assembly in "Analysis Server" through Code. I tried using "CREATE ASSEMBLY .... " which works fine with Database Server, but is not being recognized as a command in "Analysis Server".

Is there any other way of doing this except the Wizards.

Thanks!!

You could go a couple of routes...

1. XMLA - If you add an assembly via Management Studio and click the Script button at the top of the dialog, you'll see the XMLA for adding an assembly. Then you will need to figure out how to encode the bytes of your DLL as it expects and create your own XMLA request.

2. AMO - If you use Analysis Management Objects, you can do this through an API and don't have to mess with XMLA.

I would suggest #2. I haven't seen code to do exactly this. But there is some open source code to do the reverse (inspect a deployed DLL) which might help you get a feel for the AMO objects you'd use:

http://www.codeplex.com/ASStoredProcedures/Wiki/View.aspx?title=ListFunctions&referringTitle=Home

Hope that gives you enough info to get a little further than before. Post back here if not.

No comments:

Post a Comment