deschenesp
asked on
user-defined function & remote server
Hi all SQL SERVER Expert,
I've made a user-defined function that works fine on the server, but if I want to use it from a remote server it does not work and I get this error.
Example :
On the server that have the function this works good
select * from dbo.func_Serveur_Alias()
On another server that use a link server I tried this
select * from suivi.applications.dbo.fun c_Serveur_ Alias()
And I get this error
Server : Msg 170, level 15, status 31, Line 1
Line 2: Incorrect syntax near '('.
PLEASE HELP ME !!!
I've made a user-defined function that works fine on the server, but if I want to use it from a remote server it does not work and I get this error.
Example :
On the server that have the function this works good
select * from dbo.func_Serveur_Alias()
On another server that use a link server I tried this
select * from suivi.applications.dbo.fun
And I get this error
Server : Msg 170, level 15, status 31, Line 1
Line 2: Incorrect syntax near '('.
PLEASE HELP ME !!!
ASKER
I Know that using a view with a remote server is posible, but this is not the way I want to do it. I want to be able to use my functions throught remote server. The reason is that I have more than 200 functions and dont want to recreate all of them in views.
How can I use my functions with a remote server ?
How can I use my functions with a remote server ?
As far as I know, it is not possible to call a user-defined function from a remote server.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
CREATE VIEW Serveur_Alias_View
AS
SELECT * FROM dbo.func_Serveur_Alias()
then from your remote server, use this view.
SELECT * FROM suivi.applications.dbo.Ser