User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 370,597 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,026 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 5219 | Replies: 3
Reply
Join Date: Aug 2006
Posts: 1
Reputation: aiosilver is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
aiosilver aiosilver is offline Offline
Newbie Poster

Can we call a User defined Function using Linked Servers ?

  #1  
Aug 3rd, 2006
I cant call :
[111.111.111.1].Database.dbo.fn_test(@test) (Not working !)
but i can call :
Database.dbo.fn_test(@test)
why ?

and if no way to call this, can i populate in a function
a TABLE variable using a Stored Procedure to do this ?

CREATE FUNCTION fn_test(@idcode int,@idoper int)
RETURNS TABLE
AS
RETURN (EXEC [111.111.111.1].Database.dbo.sp_populate)
Not working !
Thanks for your help
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2006
Location: New Jersey
Posts: 3
Reputation: sujendra is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
sujendra's Avatar
sujendra sujendra is offline Offline
Newbie Poster

Troubleshooting Re: Can we call a User defined Function using Linked Servers ?

  #2  
Aug 12th, 2006
There might be permission violation.
Check the user associated with the Linked server and if he has sufficient privileges to access the UDF
Reply With Quote  
Join Date: Sep 2006
Posts: 26
Reputation: chmonalisa is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
chmonalisa chmonalisa is offline Offline
Light Poster

Re: Can we call a User defined Function using Linked Servers ?

  #3  
Sep 14th, 2006
hey buddy,:lol:

first you need to add up the linked server

EXEC sp_addlinkedserver
@server = 'server1',
@srvproduct = '',
@provider = 'sqloledb',
@datasrc = 'LocalServer'

then
add linkedserverlogin

EXEC sp_addlinkedsrvlogin 'server1', 'true'

then write up the query as

[server1].Database.dbo.fn_test(@test).

reply me if u need further info.
Thanks,

Chaitanya.


Reply With Quote  
Join Date: May 2007
Posts: 3
Reputation: DVHSr is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
DVHSr DVHSr is offline Offline
Newbie Poster

Re: Can we call a User defined Function using Linked Servers ?

  #4  
May 7th, 2007
I'm having a similar issue. I've defined the linked server and I can select from the remote tables, but I get an "invalid column name" error on the linked server name when I perform a function call from the linked server. Both servers are Enterprise Edition (64-bit) with build # 9.00.3042.00 (SP2). Any ideas? Thanks in advance... Dale
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MS SQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MS SQL Forum

All times are GMT -4. The time now is 6:15 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC