201310-23 發現問題:
不啓用MSDT情況,用遠程表更新本地數據表失敗,而使用insert 語句則沒有問題
delete d_item from d_item a,[lmls].lmls_wxc.dbo.d_item b where a.item_code='10A104066531' and a.item_code=b.item_code ;
update a set item=b.item
from [lmls].lmls_wxc.dbo.d_item b
inner join d_item a on a.item_code=b.item_code
where b.item_code='10A10406651';這兩語句,執行都會提示“ 服務器 'HYJK-DEV\GSQL' 上的 MSDTC 不可用。”
而同類語句:
delete d_vip_archives from d_vip_archives a,[lmls].lmls_wxc.dbo.d_vip_archives b where a.k_no=b.k_no and a.k_no='10001';
則沒有問題。
問題解決:
發現上面出現錯誤的語句,更新的表存在 delete和update觸發器。如果刪除本地表的相關觸發器,則運行正常。