跨库事务

Unless MS DTC is currently installed on the computer running the instance of the Database Engine, this example produces an error message. For more information about installing MS DTC, see the Microsoft Distributed Transaction Coordinator documentation.

USE AdventureWorks2012; GO BEGIN DISTRIBUTED TRANSACTION; -- Delete candidate from local instance. DELETE AdventureWorks2012.HumanResources.JobCandidate     WHERE JobCandidateID = 13; -- Delete candidate from remote instance. DELETE RemoteServer.AdventureWorks2012.HumanResources.JobCandidate     WHERE JobCandidateID = 13; COMMIT TRANSACTION; GO
posted on 2015-04-02 23:04  wolf12  阅读(318)  评论(0编辑  收藏  举报