SQL Server has the concept of Linked Servers ( http://technet.microsoft.com/en-us/library/ms188279.aspx ), which allows you to connect to external data sources (Oracle, other SQL Instances, Active Directory, file system data through indexing services provider, etc.), and if you really need to, you can create your own Providers that can be used by a server connected to SQL Server.
Another option in SQL Server is the CLR , in which you can write code to retrieve data from web services or other data sources as needed.
While it may not technically be "SQL / MED", it seems to do the exact same thing.
Distributed query using a local table connected to a query to a linked server with 4 parts. I think that the remotetable filter may not be applied until the whole table is pulled out locally (the documentation is fuzzy, and I found an article with conflicting opinions):
SELECT * FROM LocalDB.dbo.table t INNER JOIN LinkedServer1.RemoteDB.dbo.remotetable r on t.val = r.val WHERE r.val < 1000 ;
Using OpenQuery, the remotetable filter remotetable applied on the remote server if the filter is passed to the OpenQuery 2nd parameter:
SELECT * FROM LocalDB.dbo.table t INNER JOIN OPENQUERY(LinkedServer1, 'SELECT * FROM RemoteDB.dbo.remotetable r WHERE r.val < 1000') r on t.val = r.val
Batetech
source share