I Am a Happy Janitor – Part 1: Finding garbage

Indeed what I do is very much like the job of the janitors – like the ones who clean your building, or janitors you see at a food court, or yourself when you are taking care of garbage at your house. Doubtful you say? Let me prove it to you.   Finding garbage   What…


High CPU use of SqlClient

There was a bug in SqlClient which could cause high CPU use. The scenario is a SqlClient application sends an attention to Sql Server but receives no acknowledgement from the server because the connection is broken. The bug lies in the logic of reading server’s response from the wire. We buffer the incoming data from the wire….


Bill Gates’ Transition

Today Bill Gates announced his transition plans: http://www.msnbc.msn.com/id/13348456/ Essentially in two years, Bill Gates will transition away from a daily role at Microsoft to focus on the charitable work of the Bill & Melinda Gates Foundation. However, he will continue to be the company’s chairman after the two-year transition period. Bill Gates always is my…


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/


System.Data.SqlClient.SqlException 3988

Exception Type: System.Data.SqlClient.SqlException Number: 3988 Message: New transaction is not allowed because there are other threads running in the session If you have ever seen this type of exception when talking to RTM SQL Server 2005 (but never saw it with the Beta version of the server), it’s likely that you have an open data…


Resources

There’re a lot of resources online talking about ADO.NET: 1. Data Access and Storage Developer Center: official Data website at microsoft.com. 2. Data Access Blog: team’s blog site. You may find information interesting from different team members. 3. .NET Framework Data Access and Storage – MSDN Forums: it’s a place where lots of developers are…


Welcome to Bill Lin’s blog!

It’s not easy for me to start out the first blog entry so I’ll make it succinct. My name is Bill Lin and I’m a developer on the ADO.NET team. As a dev, I’ve worked on the team for 8 months. I currently am working for SqlClient. Moving forward, topics I expect to talk about…


Suspending and resuming threads for GC

First of all, suspension and resumption of threads is not really part of the GC. GC calls functions to do the suspension and the resumption as a service provided in the CLR. Other components in the CLR also use this service such as the debugger implementation. But it’s true that suspending and resuming because of…


When memory is running low…

When I say memory I mean physical memory. Let’s assume that you have enough virtual memory space. When the physical memory gets low you may start getting OOMs or start paging. You can experiment and see how you can avoid getting into the low memory situation but sometimes it’s hard to predict and hard to…