How To Use DTCTester Tool
Retired KB Content Disclaimer
Download the DTCTester ToolThe following file is available for download from the Microsoft Download Center:
Download the DTCTester package now.For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:
What Does the DTCTester Tool Do?
- Establishes a connection to SQL Server by using a data source name (DSN) and username and password that you provide on the command line by using the default network library.
- Creates a temporary table.
- Enlists the connection in a transaction.
- Does an insert on the temporary table.
- Commits the distributed transaction.
- Selects inserted value to make sure it was committed.
- Closes the connection.
How to Use the DTCTester Tool
- Create an ODBC data source for your SQL Server through the ODBC utility in Control Panel.
- Execute the following from the command line:dtctester <dsn name><user name><password>Replace the values in brackets as appropriate for your environment.
Typical Causes Where the DTCTester Tool Fails
- Firewall has incorrect ports closed.
- There are bad WINS/DNS entries.
- Misconfigured SQL Server cluster or dual network adapter.
- Other misconfigured network setting.
Example of Error that Occurs When the DTCTester Fails
Command Line: dtctester bad baduser badpassExecuted: dtctesterDSN: badUser Name: baduserPassword: badpasstablename=#dtc7421Creating Temp Table for Testing: #dtc7421Warning: No Columns in Result Set From Executing: 'create table #dtc7421 (ival int)'Initializing DTCBeginning DTC TransactionEnlisting Connection in TransactionError:SQLSTATE=25S12, Native error=-2147168242,msg='[Microsoft][ODBC SQL Server Driver] Distributed transaction error'Error:SQLSTATE=24000, Native error=0,msg=[Microsoft][ODBC SQL Server Driver]Invalid cursor stateAborting DTC TransactionReleasing DTC Interface PointersSuccessfully Released pTransaction Pointer
Example of Successful DTCTester Output
Command Line: dtctester test saExecuted: dtctesterDSN: testUser Name: saPassword is assumed to be NULL.Connecting to the databasetablename= #dtc7488Creating Temp Table for Testing: #dtc7488Warning: No Columns in Result Set From Executing: 'create table #dtc7488 (ival int)'Initializing DTCBeginning DTC TransactionEnlisting Connection in TransactionExecuting SQL Statement in DTC TransactionInserting into Temp...insert into #dtc7488 values (1)Warning: No Columns in Result Set From Executing: 'insert into #dtc7488 values (1) 'Verifying Insert into Temp...select * from #dtc7488 (should be 1): 1Press enter to commit transaction.Committing DTC TransactionReleasing DTC Interface PointersSuccessfully Released pTransaction Pointer.Disconnecting from Database and Cleaning up Handles
Suggested Ports to Open for DTC
|Open 135||RPC EPM (end point mapper)|
|Open 1433||TDS SQL traffic when using TCP/IP|
|Open 1434||SQL 2000 Integrated Security|
|Open 5100-5200||MSDTC [Dynamically assigned a port by the EPM]|
Article ID: 293799 - Last Review: 09/07/2004 15:15:35 - Revision: 2.5
- kbdownload kbdownload kbdcom kbhowto KB293799