Does joining two tables on different servers need a linked server, as mentioned here? The DBA group controls these server objects, and they don't want to create an excessive number of linked servers.
Is it good to "join" two tables on different servers by first reading one into memory as a variable, and potentially running another query on another server with the variable from the first?
Using C# to access SQL server SERVER_A
, and then getting all records from table TABLE_A
, we save it to an collection variable, say VARIABLE_A
.
Then we could connect to SQL server SERVER_B
, run a select query on TABLE_B
with this variable VARIABLE_A
and try to get the join result of TABLE_A
and TABLE_B
.
Will this solution achieve the desired results (that is function, and not require additional linked servers)?