this query is driving me crazy The problem is that when I'm in a server and execute a query against another server, it works well when I use hardcoded values but turns terrible slow when I use a variable. I've looked everywhere but haven't got the right answer. This problem exist in queries and Stored Procedures. I've tried this with parameters instead of variables and the problem persists.
The weird thing is that two days ago I was able to execute the query qith the variable without problems.
Any insight will be welcome
Now it works fine. The problem was an option in the server.
Under this path:
Server Objects - Providers - SQLOLEDB
I activated the 'Dynamic parameters' option and that was it! silly, uh?
The problem was that the ServerB was sending the whole table and ServerA was applying the filter instead of pasing the parameter value so the ServerB could apply the filter
i couldnt find the place to change the settings. :/
answered Mar 10, 2010 at 06:06 AM