After a datacenter move, we had some network changes that caused distributed transactions involving the DTC to fail.
To help me find the root cause of the issue I used the DTC tester tool created by Microsoft. Let me explain how to use it:
Installation
- Start by downloading this (command-line) tool here: https://www.microsoft.com/en-us/download/details.aspx?id=30746
- After downloading it, you can try to run it by calling dtctester from the commandline:
C:\Users\BaWu\Desktop>dtctester
Too few parameters
Usage: dtctester <dsn name> <user name> <password>
- The tool requires 3 parameters to be used;
- A data source name(DSN)
- A user name
- A password
Creating a DSN
- Next step is to create a User DSN for the database we want to connect to.
- Click on your Windows start icon and start typing ‘data sources’
- Select the ODBC Data Sources (32-bit) option. The ODBC Data Sources Administrator tool is loaded.
- On the User DSN tab click Add… This will open the Create New Datasource Wizard.
- Select the SQL Server driver from the list and click Finish. The current wizard is closed and a new Create new Data Source for SQL Server wizard is loaded.
- Type in a Name for the DSN, an (optional) description and most important your SQL Server name / Instance name. Click Next > to continue.
- On the next screen, select the preferred authentication method. In my case I’m using SQL Server authentication so I select the second option. In that case you have to specify a Login ID and Password. Click Next >.
- Click Next > and Finish to complete the wizard.
Usage
- Now we can invoke the dtctester tool by providing the DSN name we just created and a SQL server username and password:
C:\Users\BaWu\Desktop>dtctester test username password
- Here is the result we got back:
Executed: dtctester
DSN: test
User Name: username
Password: password
tablename= #dtc26446
Creating Temp Table for Testing: #dtc26446
Warning: No Columns in Result Set From Executing: 'create table #dtc26446 (ival int)'
Initializing DTC
DtcGetTransactionManager failed: 8004d01b
DtcGetTransactionManager Call Error: Indicates unable to connect to the transaction manager, or the transaction manager is unavailable.