dbTalk Databases Forums  

Stored Procedure equivalence in SSAS 2005

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Stored Procedure equivalence in SSAS 2005 in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ricocali@hotmail.com
 
Posts: n/a

Default Stored Procedure equivalence in SSAS 2005 - 09-08-2005 , 12:20 PM






I have a need for something similar to a stored procedure in SSAS2005
where i can pass parameters to something like MDX. Is that possible?


Reply With Quote
  #2  
Old   
Dave Wickert [MSFT]
 
Posts: n/a

Default Re: Stored Procedure equivalence in SSAS 2005 - 09-08-2005 , 08:49 PM






Not in AS2K. It is there for AS2K5.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI Systems Team
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.


<ricocali (AT) hotmail (DOT) com> wrote

Quote:
I have a need for something similar to a stored procedure in SSAS2005
where i can pass parameters to something like MDX. Is that possible?




Reply With Quote
  #3  
Old   
ricocali@hotmail.com
 
Posts: n/a

Default Re: Stored Procedure equivalence in SSAS 2005 - 09-12-2005 , 07:44 AM



Where? How is it done?


Reply With Quote
  #4  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Stored Procedure equivalence in SSAS 2005 - 09-12-2005 , 06:02 PM



Here's Mosha's blog entry on AS 2005 Stored Procedures:

http://sqljunkies.com/WebLog/mosha/a...2005/3/31.aspx
Quote:
Random sampling of MDX set using stored procedures with server ADOMD.NET

Analysis Services 2005 comes with true server side stored procedures
support. On top of that, Analysis Services 2005 also has server side
ADOMD.NET object model. Server ADOMD.NET looks at first similar to
client ADOMD.NET, but they serve very different purposes. Client
ADOMD.NET is modeled after ADO.NET and ADOMD, and it allows sending MDX
queries to the server and exposes nice object hierarchy over cube
metadata. Server ADOMD.NET, on the other hand, is there to extend MDX
object model itself. It operates in the same type space as MDX, for
example itt has classes such as Set, Tuple, Member etc, which are very
familiar to any MDX programmer. Today in the newsgroup I saw a question
"How to implement random sampling from a set". This is exactly kind of
task that server ADOMD.NET and stored procedures are designed for. In
order to accomplish it, we will create assembly RandomSample, and
implement function Sample(set, k) in it. This function has same
signature as Head and Tail MDX functions, only instead of returning
first or last k tuples from the set, it returns k random ones. The
algorithm used here iterates over the set and probes each tuple with
probability (k-j)/(n-i). I didn't prove that it produces unbiased
uniform distribution, but it probably does. Anyway, the exact algorithm
is not very important, what is more important is to demonstrate how to
use server ADOMD.NET. After the code below is compiled into assembly, it
needs to be registered in the server, and then the function Sample can
be called from MDX, for example like this:
...
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.