本地庫 B 的 tb2 insert 到 A.tb1
-------------------------------------
在遠程庫 A 中建過程如下
create proc sp_test()
as
insert tb1
select * from
(SELECT a.*
FROM OPENROWSET('SQLOLEDB','seattle1';'sa';'MyPass',
'SELECT * FROM B.dbo.tb2') AS a)D
where not exists (select 1 from tb1 where tb1.key = D.key)