Where do Linked Server Queries get executed?
8
votes
1
answer
2425
views
I have two instances _ServerA_ and _ServerB_, and I have created a linked server in _ServerA_ for _ServerB_ as **Linksrv_B**.
I can execute a query on _ServerA_ using the four part naming convention:
SELECT * FROM Linksrv_B.master.sys.databases
or
OPENQUERY()
:
SELECT * FROM OPENQUERY(Linksrv_B, 'SELECT * FROM master.sys.databases')
I know linked server works across heterogeneous database using distributed transaction as a rowset.
1. Where does the OLEDB provider gets initiated/connected? ServerA or ServerB?
2. Where does the query gets executed on ServerA or ServerB? Does optimizer comes into play if so on which server?
3. Where does the result set get cached?
4. Could anyone give us a detailed explanation how linked server works.
Asked by info.sqldba
(327 rep)
Aug 17, 2017, 02:11 PM
Last activity: Aug 17, 2017, 03:08 PM
Last activity: Aug 17, 2017, 03:08 PM