Skip to main content

Winter in the City

· One min read

Sub-arctic winds blowing across the
wide boulevard leaving crystalline
mounds glinting and glistening as if
all the stars in the heavens had
fallen to the curb, no larger than
they look from billions of miles away.

NaCL + (crystal) H20 -> salt flats
that would make Utah proud, leaving
car and shoe alike trembling
with dread.

The sky is clear, the air crisp and
pure, every color standing in sharpest
relief against argent fields aground.
That is, until the snow stops falling.

Day by day, what was white turns gray;
and what was fresh, alive and bright,
now is gritty, post-industrial blight.
Then the magic flakes materialize
again, wiping away the grime (or just
covering it), flushing the soot from
the air like a great Gaian sneeze.

Is that another 6 inches on the
driveway? I'm staying in today.

Diagnosing an Obnoxious Reporting Timeout Problem

· 4 min read

We had a horribly pernicious timeout problem recently. It was occurring in a .Net 2.0 application written to retrieve reports from SQL Server 2005 Reporting Services via its web services interface. The query behind the report was a bit large, but typically would run under 30 seconds. We had judged that new indexes were out of the question because of their impact on the already slow program that loads the key data. All of the sudden, we started getting continuous timeouts. After a couple of days, the underlying query was up to 15 minutes execution time!

In the end multiple interacting problems had to be solved in order to get the reports running properly. For the past few weeks they've been running without a hitch.

String.IsNullOrEmpty - performance considerations, bugs

· 2 min read

I once read that .Net's String.IsNullOrEmpty performs better, and is safer, than just checking to see if a particular string has an empty value. I.e. replace if (myString == "") or if (myString.Equals(string.Empty)) or if (myString.Length == 0) with if (String.IsNullOrEmpty(myString)). It is certainly easy to read, and points out that the string should really be checked for null value before doing anything else.

Starting Out with Service Broker

· 2 min read

Problem

you have an application that needs to trigger some process via SQL Server but don't want your main process hung up waiting. So you decide to setup Service Broker in order to make an asynchronous call, with the receiving service doing your work for you. You've read all about it, and tried it out after hours, but it didn't work. What gives?

(SQL) Blocking Giving You the Blues?

· 3 min read

Problem

You have a long-running query in SQL Server that is causing failures all over the place. Activity Monitor shows you the cause is blocking.

Causes: Blocking essentially means "you've locked a table, and now someone else is stuck waiting for you to unlock it." We all know (or should know) that transactions cause table locks, and thus blocking. That's one reason that transactions need to be short and sweet. But there is another source of blocking, one that can be a bit more subtle: long-running queries that are trying to read committed data only.

SSIS - 32 Bit ForEach File Enumerator Was Not Registered

· One min read

I've been having problems migrating some SSIS packages from localhost (32bit) to the server (Windows Server 2003 64bit, SQL Server 2005 Enterprise SP2). These packages have Excel data connectors, and hence must be run in 32 bit mode. When I try to run them with the 32bit dtexec, I get the "generic" error "the package failed to load" (0xC0010014). I stripped down the package until I found the source of the error: a ForEach container, using the File Enumerator with the directory set to a variable. When I remove the variable setting it works, when I add the variable expression it fails. Note: this does not fail in the 64bit dtexec.

Evaluating SOA for Enterprise Architecture

· 4 min read

A few weeks ago I started trying to better understand the concepts behind service oriented architecture (SOA), how I can apply them to my work, and if doing so is actually a good idea. When I first started hearing about SOAP years ago, I understood it as an alternative to objects — you build and consume services instead of objects. This sounds great for highly distributed environments, but also sounds like a performance nightmare in a business environment that does not need distribution. So I largely ignored it, and assumed I could ignore SOA as well.

Configuring Apache (Wamp) With Additional Ports

· 2 min read

Years ago I knew how to configure the Apache webserver, back when I was a grad student / Linux admin. As any reader will have figured out, I've been a Microsoft-centric programmer for a number of years now. Thus it is not surprised that I would have forgotten some basics about Apache.

RS and XSLT, pt3.3: Using XSLT for Custom Reporting Services Output

· 3 min read

We recently returned to the discussion of using XML style transforms to format flat file output from Reporting Services. The report we created was pretty basic, so let's look at something more complex: a fixed format.

Let's say the client has given us the following file format, and we've trimmed the data in the SQL query to make sure it doesn't exceed the data width:

safnet logo