Are there any huge performance issues or security concerns?
Using SQL Server 2005 and higher
I've set up linked servers to Access, DB2, Oracle, Sybase and the odd proprietary ODBC driver. I'd prefer SSIS or .net code now...
Yes - Queries which join two datasets in different physical databases perform poorly.
e.g. If you run a query between table A on the current server and B on a linked server.
Select A.Field1, B.Field2 FROM A INNER JOIN B on A.Id = B.Id
WHERE B.Id = @InputId
you may find that all the records for table B are retrieved - effectively
Select * from Table B
into the working server.
What you'd want to do instead is have a usp on the linked server which takes an Id as a parameter and returns a filtered recordset from Table B
Then rewrite the query above to join Table A to the usp instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With