SQL Server Cursors

Personally, I dislike them. I avoid using them whenever possible. But I came across this excellent post that talks about cursors, alternatives to cursors, and provides a performance comparison between them.

The performance comparison in particular was quite useful.  If I’m able to reproduce the results for myself in a local environment, I may have to revise my current stance on cursors.

Getting rid of ThreadAbortException

We came across this on one of my current projects. It didn’t prevent the application from working, but I didn’t want a bunch of instances of it in our error logs. One of the consultants who works for me found this Knowledge Base article that solved the problem.

The basic fixes are:

  • Call Response.Redirect like this:
    Response.Redirect ("nextpage.aspx", false);
  • Call Server.Execute instead of Server.Transfer

ApexSQL Diff

I first heard about this tool from my friend Greg at work.  I’ve been using it the past couple of weeks now as a free trial and it’s awesome.  Compare the structure and/or data of any two databases and synchronize them with just a few mouse clicks.

This tool is perfect for deploying database changes to different environments.  It’s already saved me hours of time compared to what I would have spent trying to do things manually.  I’ll definitely be buying a copy for myself.  Every DBA should own a copy.

Daimler-Chrysler: Another Failed Merger?

Today’s news brings word that Daimler may be looking to break up with Chrysler.  I find this particular merger interesting because it came up more than once in my MBA studies.  While the problems we studied had more to do with integrating two different engineering cultures and technology platforms, the financial wisdom of such a merger was always what I questioned.

I have a strong anti-merger bias, having been on both sides of such mergers at each of my last three employers.  I’ve written about them in this blog before.  Thanks to this transcript of a PBS NewsHour segment, it’s possible to look back at the time when this merger was fresh and new.

I found it interesting to read how positively all the guests viewed the merger at the time.  Not until almost the end of the segment do you find much skepticism about whether or not the merger will be successful.

Short circuiting in .NET

Last week revealed an interesting difference between C# and VB.NET. C# operators like “and” (&&) and “or” (||) do it automatically. The VB.NET operators “And” and “Or” don’t do this by default. So if you use these, all the conditions are evaluated, regardless of whether or not that’s necessary.

In the .NET 2.0 Framework, instead of making these operators work like the C# ones, VB.NET added two new keywords: AndAlso and OrElse.

It’s good that VB.NET has the facility, I just don’t like the implementation.  It’s another reason to prefer C# at the very least.

New Monitor (At Last)

I’ve been using a 19″ Hitachi CM751 monitor for a long time–until today.  FedEx delivered a refurbished 24″ widescreen from Dell this afternoon.  Even at 1680×1050 (I’m still plugged into a KVM switch that doesn’t have a DVI port), it seems enormous.  I should have gotten one of these much earlier–it looks great.