SQL query on multiple SQL servers
I have 2 SQL servers. I need a SQL query that can join two tables that are on two different servers.
how
SELECT *
FROM Server1.Db1.dbo.table1 A
INNER JOIN Server2.Db1.dbo.table2 B ON A.Id = B.Id
and I have no server names, I use the servers IP instead. Do I need to enable these SQL servers as a linked server in order to allow such cross-server queries?
+3
source to share
2 answers