user-defined function client server question

user-defined function client server question

Post by Matthew Faulcon » Sat, 16 Feb 2002 04:45:16



Is it the case that anytime I want to use a user-defined function in
an MDX query I have to have that function installed on the client
computer?

If so, what a pain!

What if I put the udf in a calculated measure defined on the server?
Do I have to have the UDF defined on an client that wants to see
results with this calculated measure?

In general can anyone refer me to someplace that would demistify what
goes on with user-defined functions? I have the book MDX Solutions by
Spofford. He says on p. 178: "It is important to remember that any
function libraries that you use for MDX need to be available on the
client machine."

This doesn't fit at all within the model I have of what actually
happens. The server parses the query not the client right?

Say I am a client. I make a connection to a server. I send it text
that happens to be an MDX query. It interprets it and uses its access
to the data to figure out the answer. If there is some udf, the server
is going to need to figure out how to handle it. As the client, I am
out of the loop until it sends me a response to my query like: "here
are the results" or "this query doesn't make sense". Obviously if the
UDF is installed on the client then there is something I am missing.

I can see why someone might want the client to be able to say to the
server here is my query. It uses a UDF and here is the UDF. Figure out
the results. But to me it seems like more often than not a UDF would
be wanted in a case where the logic of the UDF is defined on the
server so that when the organization wants to change that logic, they
don't have to give every client the new UDF.

Any help is greatly appreciated as I don't want to go down the road of
using UDF's if it turns out it is going to be a nightmare to make sure
all clients have the correct version of the correct dll's installed on
their computer.

 
 
 

user-defined function client server question

Post by George Spoffor » Sat, 16 Feb 2002 04:48:55


Matthew,

Parsing of MDX and much of its execution takes place on the client, in the
PivotTable Service. Due to caching performed in the PivotTable Service,
maybe during the course of query execution the server is never consulted
at all. It's a different model from a typical RDBMS or other OLAP server.

A quick check tells me that MDX Solutions doesn't really emphasize the
AS2K calculation architecture. ("Microsoft OLAP Solutions" did.) I don't
find a reference to location execution until p 296, dealing with
optimization. I'll try to make this better in the 2nd ed- it looks like it
belongs in Chapter 5.

HTH


> Is it the case that anytime I want to use a user-defined function in
> an MDX query I have to have that function installed on the client
> computer?

> If so, what a pain!

> What if I put the udf in a calculated measure defined on the server?
> Do I have to have the UDF defined on an client that wants to see
> results with this calculated measure?

> In general can anyone refer me to someplace that would demistify what
> goes on with user-defined functions? I have the book MDX Solutions by
> Spofford. He says on p. 178: "It is important to remember that any
> function libraries that you use for MDX need to be available on the
> client machine."

> This doesn't fit at all within the model I have of what actually
> happens. The server parses the query not the client right?

> Say I am a client. I make a connection to a server. I send it text
> that happens to be an MDX query. It interprets it and uses its access
> to the data to figure out the answer. If there is some udf, the server
> is going to need to figure out how to handle it. As the client, I am
> out of the loop until it sends me a response to my query like: "here
> are the results" or "this query doesn't make sense". Obviously if the
> UDF is installed on the client then there is something I am missing.

> I can see why someone might want the client to be able to say to the
> server here is my query. It uses a UDF and here is the UDF. Figure out
> the results. But to me it seems like more often than not a UDF would
> be wanted in a case where the logic of the UDF is defined on the
> server so that when the organization wants to change that logic, they
> don't have to give every client the new UDF.

> Any help is greatly appreciated as I don't want to go down the road of
> using UDF's if it turns out it is going to be a nightmare to make sure
> all clients have the correct version of the correct dll's installed on
> their computer.

--
George Spofford
Microsoft MVP
Chief Architect / OLAP Solution Provider
DSS Lab

ISVs & IT organizations: Find out how DSS Lab can speed your development!