Create a linked server on the server where a is located for the server where b is located then run this on the server where a is locatedINSERT servername.databasename.dbo.b (id, stage)SELECT id, stageFROM aWHERE NOT EXISTS (SELECT * FROM servername.databasename.dbo.b x WHERE x.id = a.id AND x.stage = a.stage)
Or create a linked server on the server where b is located for the server where a is located then run this on the server where b is locatedINSERT b (id, stage)SELECT id, stageFROM servername.databasename.dbo.aWHERE NOT EXISTS (SELECT * FROM b x WHERE x.id = a.id AND x.stage = a.stage)