More on MSDTC

Last time I wrote a post on MSDTC under Vista. Here I’d like to talk a general MSDTC issue, which is not Vista-specific. Internally MSDTC uses NetBIOS names and passes them to RPC to talk to remote machines. This requires both server and client to be able to resolve each other’s machine name. Sometimes things …

Using MSDTC between Vista clients and Windows 2000 servers

Background Consider the following two scenarios: 1.       You have implemented a .NET application accessing a specific COM+ service with automatic transaction processing.  You derived a class from ServicedComponent, set the Transaction attribute for the class, and applied the Automatic attribute to a method which opens a SqlConnection. 2.       Inside a TransactionScope, you wanted to open …

General Network Error in .Net Framework 1.1

Under some circumstances (such as with certain network bandwidth), you might get a general network error in .Net Framework 1.1 when executing a query that takes longer than SqlCommand.CommandTimeout value. This has something to do with how SqlClient 1.1 deals with timeout. Basically we track the timeout value by decrementing it each time after we …

Internal connection fatal error when trying to run a UNION ALL query or to call the DeriveParameters method

http://support.microsoft.com/kb/913764/ The KB article didn’t say a lot of details about this bug. Usually the following conditions have to been met in order to trigger the bug: 1. Query must run against sql2000 (Sql2005 works fine) 2. The table name has to include 3 or more dots, ie: [A.B.C.D.E] 3. There has to be an …

Timeout when using SqlBulkCopy

For certain size of data, SqlBulkCopy.WriteToServer() may throw a timeout exception, although it won’t happen when MARS is turned on. The problem is caused by a bug in the code for handling some boundary scenarios. The workaround is to apply this patch: http://support.microsoft.com/kb/913177/