Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

User defined function calls over linked servers

3 views
Skip to first unread message

Loren Z

unread,
Nov 19, 2009, 1:32:23 PM11/19/09
to
We are running SQL Server 2008 SP2 Build 3282 and we have have tried using a
user defined function over a linked server. We did not have success getting
the message:

"Remote table-valued function calls are not allowed."

We have looked into this and found that UDF calls are not allowed over
linked servers.

Are there any workarounds for this?


Eric Isaacs

unread,
Nov 19, 2009, 1:55:12 PM11/19/09
to
Use a stored procedure instead, or bring the data from the remote
server over to a local table before calling the table-value function
against that local data. If multiple users are at play, add a GUID to
the row of data that's coming across into the local table so you know
that the user's data is the one with that particular GUID.

-Eric Isaacs

Jay

unread,
Nov 19, 2009, 1:57:49 PM11/19/09
to
Just a wild idea here, I don't know if it will work, but ...

Set the UDF to fire on an insert trigger to a special table (you define).
When you want it to run, insert a row into the table. Or, to keep the table
clean, use a delete trigger and insert, then delete the row.

I suppose if you need parameters, then it would have to be an insert.


"Loren Z" <anon...@discussions.microsoft.com> wrote in message
news:%23lwejaU...@TK2MSFTNGP05.phx.gbl...

Jay

unread,
Nov 19, 2009, 2:43:49 PM11/19/09
to
I like this solution better. Pull the data locally, then run your UDF.

"Eric Isaacs" <eis...@gmail.com> wrote in message
news:a230323c-9fcf-4746...@v15g2000prn.googlegroups.com...

0 new messages