Database Research & Development

  • Home
  • NoSQL
    • NoSQL
    • Cassandra
  • Databases
    • Database Theory
    • Database Designing
    • SQL Server Coding Standards
    • SQL Server
    • PostgreSQL
    • MySQL
    • Greenplum
    • Linux
  • Interviews
    • SQL Server Interviews
    • MySQL Interviews
    • SQL Puzzles
  • DBA Scripts
    • SQL Server DBA Scripts
    • PostgreSQL DBA Scripts
    • MySQL DBA Scripts
    • Greenplum DBA Scripts
  • Home
  • Blog Archives !
  • (: Laugh@dbrnd :)
  • Contact Me !
sqlserverinterviews
Home 2016 November SQL Server: How to configure and enable Microsoft Distributed Transaction Coordinator (MSDTC)?

SQL Server: How to configure and enable Microsoft Distributed Transaction Coordinator (MSDTC)?

This article is half-done without your Comment! *** Please share your thoughts via Comment ***

The Microsoft Distributed Transaction Coordinator mostly use for distributed transactions.

A Distributed Transaction is a very simple transaction which executes between two or more servers.
For example, We started one transaction in Server one and same transaction is going to finish in Server two.

In this kind of situation, we require MSDTC enabled in SQL Server.
To enable distributed transactions across different servers, you need to configure MSDTC on both the servers.

The following is a list you need to check:

1. DTC service is running:

Please run “services.msc” from windows run dialog to check if it is running.
If it is stopped, please start it by right-clicking on it and choose “Start”.

2. Network DTC access is enabled:

Please open Distributed Transaction Coordinator using Control Panel -> Administrator Tools -> Component Services.
Right click on LocalDTC and make sure that Network DTC should be enabled.

3. DTC service is configured to be allowed to access network in firewall in the linking server:

Please make sure this service could access the network and could receive connection from other server.

4. XACT_ABORT is enabled:

We could enable XACT_ABORT with the following statement:

1
SET XACT_ABORT ON

5. Please execute the status of “Ad Hoc Distributed Queries”:
“Ad Hoc Distributed Queries” should enabled

1
2
3
4
sp_configure 'show advanced options', 1
reconfigure
GO
sp_configure 'Ad Hoc Distributed Queries'

If the value under run_value is 0, please execute the following script to enable it:

1
2
3
4
5
sp_configure 'show advanced options', 1
reconfigure
GO
sp_configure 'Ad Hoc Distributed Queries', 1
reconfigure

Nov 11, 2016Anvesh Patel
SQL Server: Script to find top 20 Stored Procedure, which are utilizing more CPUSQL Server: Error 15023 User already exists in current database (Problem of Orphan User)
Comments: 2
  1. Giovani
    January 21, 2019 at 7:12 am

    Hello. I tried to follow the instructions above … but when I tried to combine 2 postgres databases and an sql server an error appeared like this:

    OLE DB provider “PGNP” for linked server “db_orange” returned message “MSDTC XARMCreate error, hr=80004005
    “.
    Msg 7391, Level 16, State 2, Procedure insert_clocking_temporary, Line 8 [Batch Start Line 6]
    The operation could not be performed because OLE DB provider “PGNP” for linked server “db_orange” was unable to begin a distributed transaction.

    Can you help me ?

    • Anvesh Patel
      Anvesh Patel
      January 21, 2019 at 7:16 am

      Which database are you trying to connect?

Anvesh Patel
Anvesh Patel

Database Engineer

November 11, 2016 SQL ServerAnvesh Patel, database, database research and development, dbrnd, distributed transaction, linked server, msdtc, SQL Query, SQL Server, SQL Server Administrator, SQL Server Monitoring, SQL Server Performance Tunning, SQL Server Tips and Tricks, TSQL
About Me!

I'm Anvesh Patel, a Database Engineer certified by Oracle and IBM. I'm working as a Database Architect, Database Optimizer, Database Administrator, Database Developer. Providing the best articles and solutions for different problems in the best manner through my blogs is my passion. I have more than six years of experience with various RDBMS products like MSSQL Server, PostgreSQL, MySQL, Greenplum and currently learning and doing research on BIGData and NoSQL technology. -- Hyderabad, India.

About DBRND !

dbrnd

This is a personal blog (www.dbrnd.com).

Any views or opinions represented in this blog are personal and belong solely to the blog owner and do not represent those of people, institutions or organizations that the owner may or may not be associated with in professional or personal capacity, unless explicitly stated.

Feel free to challenge me, disagree with me, or tell me I’m completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or anonymous comments) - so keep it polite.

The content of this website is protected by copyright. No portion of this website may be copied or replicated in any form without the written consent of the website owner.

Recent Comments !
  • Anvesh Patel { Sure will do... } – May 27, 12:43 PM
  • Anvesh Patel { Great... } – May 27, 12:41 PM
  • Anvesh Patel { Great... } – May 27, 12:39 PM
  • Anvesh Patel { Great... } – May 27, 12:36 PM
  • Anvesh Patel { Great... } – May 27, 12:28 PM
  • Anvesh Patel { Great... } – May 27, 12:27 PM
  • Anvesh Patel { Great... } – May 27, 12:16 PM
  • Older »
Follow Me !
  • facebook
  • linkedin
  • twitter
  • youtube
  • google
  • flickr
© 2015 – 2019 All rights reserved. Database Research & Development (dbrnd.com)
Posting....