SQL Server 2005 Tip #1 - 启动分布式事务协调器 (DTC)

默认情况下,在访问 SQL Server 2005 Express 时使用 System.Transaction.TransactionScope 的情况下,会出现以下错误
MSDTC on server ‘(server name)\SQLEXPRESS’ is unavailable.

原因是 DTC 在默认情况下是被禁用的,需要手动启用。在 Windows XP 和 Windows Vista 下启用的步骤稍有不同,以下是 Vista 下的启用步骤:

 

  1. Click Start, click Run, type dcomcnfg and then click OK to open Component Services.

  2. In the console tree, click to expand Component Services, click to expand Computers, click to expand My Computer, click to expand Distributed Transaction Coordinator and then click Local DTC.

  3. Right click Local DTC and click Properties to display the Local DTC Properties dialog box.

  4. Click the Security tab.

  5. Set the following options on the Security tab of the Local DTC Properties dialog box and click OK.

     

    Configuration OptionDefault ValueRecommended Value

    Network DTC Access

    Disabled

    Enabled

    Client and Administration

      

    Allow Remote Clients

    Disabled

    Disabled

    Allow Remote Administration

    Disabled

    Disabled

    Transaction Manager Communication

      

    Allow Inbound

    Disabled

    Enabled

    Allow Outbound

    Disabled

    Enabled

    Mutual Authentication Required

    Enabled

    Enabled if all remote machines are running Win2K3 SP1 or XP SP2 or higher.

    Incoming Caller Authentication Required

    Disabled

    Enabled if running MSDTC on cluster.

    No Authentication Required

    Disabled

    Enabled if remote machines are pre-Windows Server 2003 SP1 or pre- Windows XP SP2.

    Enable TIP

    Disabled

    Enabled if running the BAM Portal.

    Enable XA Transactions

    Disabled

    Enabled if communicating with an XA based transactional system such as when communicating with IBM WebSphere MQ using the MQSeries adapter.

  6. Open the Control Panel, open Windows Firewall, and click Change settings to display Windows Firewall Settings.

  7. Click the Exceptions tab.

  8. Check the box for Distributed Transaction Coordinator and click OK.

 

转载于:https://www.cnblogs.com/csharpstyle/articles/1507991.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值