I'm a real adult with a real adult job. My own apartment and car keys and everything! I tend to ignore this and wander through life as childishly as possible (as soon as I'm off the clock, naturally). I like pointy sticks, pointless trivia, and Point Break.

IIS Is Rude and Unhelpful

So after pounding my head against the wall trying to update the wildcard cert to each of our web servers that needed it, I wanted to cause bodily harm to the team in charge of IIS 7.0. Turns out that when you install a certificate, if you haven’t done the trust chain correctly (or something like that – I never got it to work “the right way”), it just disappears without an error message.

How does the lazy efficient sysadmin get around this without having to learn things? Simple! The instructions given worked fine on the server that actually made the request. From there, export the certificate and import everywhere else, instead of trying to install and set up the trust chain through mmc.

Steps for the simple:

1. Go to where your initial cert is installed in IIS.
2. Select “export.”
3. Put it someplace. Anyplace. I don’t care.
4. Go to your secondary server.
5. Go to IIS manager -> SSL Certificates.
6. Import. Select wherever you put it.
7. Set your bindings (navigate to the site in IIS, click “bindings” on the right, select your new cert from the dropdown).
8. Take a minute to angrily blog about it.
9. Go back to what you actually needed to work on before, but had to drop because the certs are all expiring tomorrow.

The Three D’s Of Reporting

Enterprise reporting can be a huge pain to deal with, but it’s not nearly as complex as it looks. All the hows and whys can be summed up with three key elements of a report.

  1. Design
  2. Data
  3.  Delivery

That’s really it. Everything is going to fall into one of those three categories. That’s not to say there’s no overlap, though! Delivery can be held up with design requests. Design might mean starting with your data and trying to spruce it up. And all the data in the world is useless if you can’t deliver it. It’s a vicious cycle that eats up time and money. When you’re looking for a reporting solution, look at how you want to address each issue.

Look through your current solution and break it down. Where are your bottlenecks? Where are you settling for what you think you can get instead of what you really want? What do you need that you aren’t getting at all?

Reporting should be simple. Design your report exactly how you want to see it. Access and display your data, wherever it lives, whatever form it’s in, however many places it comes from. Deliver it to who needs it, when they need it, quickly and easily. If your solution doesn’t let you do those three things, look for something new.

Casting: Not just for wizards and fishermen

When working with somebody else’s data, you don’t always have a choice in how things are structured. Storing numbers as varchars isn’t the ideal solution in a SQL database, but if that’s what gets delivered, that’s what you work with. Want to sort by the numerical value, not the alphabetical? Use the SQL cast() function! Pass it a field and a type, and you’re good to go.

The fun part, to me, is showing how to do it. I do most of my demos with the standard Northwind database most SQL users are familiar with. As far as I’m aware, its numbers are always stored as numbers. So first, I’m going to show the output sorted alphabetically with this command:

SELECT ProductID, Quantity FROM dbo.[Order Details] ORDER BY CAST(Quantity AS VARCHAR)

Our numbers are now alphabetical (i.e. 1, 2, 10 will be ordered as 1, 10, 2). Now I’ve successfully proven that I can do exactly what they don’t want. So now…

SELECT ProductID, Quantity FROM dbo.[Order Details] ORDER BY CAST(CAST(Quantity AS VARCHAR) AS INT)

And voila! We’ve used nested CAST() functions to order a SQL query exactly as it would have been ordered to begin with. But hey, you work with the data you have, not the data you want. What matters is that you get it done, right?

Enhanced by Zemanta

Eye Blog Now

Blogs have thoroughly replaced the eyes as windows to the soul. Whether that’s a good thing is a valid question that somebody else can deal with. I’m just going to assume it as fact and work from there.

What I’m going to deal with is simple solutions to complex problems. As a Sales Engineer at Windward, this is the challenge I face every day. While Rube Goldberging your way through a solution is way, WAY more fun, it’s my goal to black-box as many of the gears, pulleys, bowling balls, cuckoo clocks, dominoes, and water-drinking-birds as I possibly can. Why? Because complication is interesting but useless. Simple is where it’s at.

“Turn the middle side topwise” isn’t going to help someone solve a Rubik’s cube. This will. I’m gonna do the same.