Question

I was told by our IT team that we cannot use the Openquery command in MS Sql Server anymore. They claimed it was possible to slow down the server because every query requires a full table load, and all queries slow it down, etc.etc.

I was somewhat puzzled by this as I thought an OpenQuery command was similar to the 'passthrough' query in Access. The query goes to the IBM server, which executes the command and only sends the results back to SQL Server. I have read through OpenQuery on the internet and nothing I've read makes me believe that it loads or sends a whole table and then SQL Server filters the results.

I assume its possible for them to lock down the DB2 servers and prevent linked servers from SQL Server, but for my future knowledge can someone explain any perils to using OpenQuery when connecting to IBM DB2?

Thanks,

Was it helpful?

Solution

Please read this. Can you avoid OpenQuery? The best alternative would be to use a store procedure command or at least craft a EXECSQL with a SP target.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top