Skip to content

The Geek Costume

It’s Halloween, and while many of you are too old to dress up in a costume, some of you may be planning on joining your kids for trick or treating, or even attending a party of some sort. It can be fun, though I have to admit that I’ve rarely dressed up as an adult. However if my kid asked me to, as Patton Oswalt’s did, I’d probably join in on the fun.

There are not shortage of fictional heroes available for us as geeks. Many of us have admired characters from the science fiction, comic, fantasy, and other worlds. The various SQL Bits conferences have included some great themes, with steampunk this year and the medieval theme last year. There was even a Jedi sighting on Pass TV last year.

This week, with the holiday in full swing tonight, I wanted to ask you a question on which costume you’d pick. Whether you have one ready or not for tonight answer this:

Which costume would you choose to dress up in for an event?

It could be a character from fiction, or even a device of some sort. Maybe you want to use technology to build an awesome costume? While I’d be tempted by the Indiana Jones look, I think I might choose something in the Batman genre if I had to.

Let us know this week what you’d pick, have a safe holiday tonight, and have a great weekend.

Steve Jones

The Voice of the DBA Podcast

Listen to the MP3 Audio ( 1.9MB) podcast or subscribe to the feed at iTunes and LibSyn. 

Have You Been Hacked?

I am glad that I don’t work in the retail industry as a DBA. It seems that I read about a new security breach every few weeks from some company. Home DepotTargetStaples, the list goes on and on, and includes more and more businesses that at least some of us use regularly. It’s gotten to the point where I expect that I’ll need to replace at least one of my cards every year because of some data loss issue.

However it’s not just retail companies that are getting attacked. According to the Q3 Dambella report, companies are having dozens of devices infected daily and seeing increasing numbers of point-of-sale (POS) attacks all the time. Even those companies that don’t deal directly with credit cards and consumers are finding that they are targets of network attacks more and more. Some of these are merely vandalism, but many are intended as some sort of industrial espionage or data breach that can be used for profit.

This is the other edge of the data professional’s sword. We have low unemployment and high salaries, but we are also becoming responsible and the target of blame when data is stolen. I really believe that theft detection is becoming more important for data professionals. We won’t be able to prevent attacks, but we surely need to know when they have occurred and be prepared to respond.

I don’t know how our profession will move forward in the future to meet these needs. Perhaps we’ll become bonded like locksmiths. Perhaps we’ll be bound by insurance requirements to adhere to best practices. I’m not sure any of that will help increase security, but it might help reduce the liability that we may face.

Steve Jones

The Voice of the DBA Podcast

Listen to the MP3 Audio ( 2.3MB) podcast or subscribe to the feed at iTunes and LibSyn.

Packing for Seattle

This will be a long trip, and I’ve got some extra items to pack. A new hat


and, of course, my leggings for the Argenis Without Borders campaign (you can still donate).


No, those aren’t my legs, and you’ll have to wait for pictures next week with me wearing these things.

This is going to be an interesting trip. It’s 6 days for me, which is something I’ve done with one bag, but I’ve got to manage a few extra items, including some Red Gate swag and get the rainbow stuff, the kilt, and more ready. This might be one of those times I need to actually check a bag, though I’m going to try and avoid it.

Maybe I’ll pack less and do some laundry, especially for workout clothes. 6 days of running gear won’t be pleasant to pack after it’s been used.

Quick Schema Auditing

I was working on a demo recently and needed to show that a little monitoring can help you catch schema changes. At first I looked at SQL Audit and DDL Triggers, but then I ran across a short custom metric on the SQL Monitor Metrics site that my company, Red Gate Software, put up to help people share their custom monitoring metrics and alerts.

The metric is called Schema Modified, and it uses a really simple query. This is all is does:

SELECT DATEDIFF(ss, '1970', MAX([modify_date]))
 FROM [sys].[objects];

It calls this query every minute for each database on which you have it enabled. This gives you a count of the number of seconds between 1970 and the latest schema modification in your database.

Now that’s not terribly useful, but if you look for changes in this metric, then it becomes interesting. For example, in one of my tests, I got this value


If I continued to run the query,  the same value was returned if nothing changed in the database. However once I added a new object, then the value changed to


That’s an increase, and my alerting was looking for changes in the value, so when this new count of seconds appeared, an alert was raised.

Using the Information

What good does it do you to know that something changed? Admittedly, this may or may not be useful. This doesn’t tell you what changed, and certainly help you determine who changed things.

However, in more than a few of my development jobs, we knew people would change things. That wasn’t the issue. Really we wanted to know that something changed, and if so, we would investigate further. Often we could easily determine who made the change, based on what it was.

This is really a trigger more for something like production, where I don’t expect changes, except when I deploy things. Any other change is cause for concern, and I might have alerts set to ping people when there’s a change. If we’re making the change, then we ignore the alert, because we’re aware of it.

If we aren’t deploying changes, then we start investigating immediately.

Triple Digits

The salary surveys for 2015 look good for data professionals. The Robert Half results that appear in this piece show lots of salaries creeping well into the triple digits for annual salary in the US. Not only are the upper bounds over $100k for many data professional areas, but so are many starting salaries.

The values show a good increase from 2014, so if you aren’t thrilled with your job and are thinking of changing positions, you might land yourself a nice raise. I wouldn’t encourage anyone to change jobs for just money, and certainly the problems at your employer might be worse at others, but if you have other reasons for leaving, certainly look for a raise if you can.

I’m also pleased to see a wider variety of positions appearing in the survey results. To me that points to a maturing of our industry and the recognition that we do a variety of jobs, all of which are different. And based on the salary responses, all of these are also important to companies. I’m have confidence that as the data we manage becomes more important, and many of us continue to work on improving your skills, we’ll continue to see greater rises in salaries in the future.

The one thing in the piece that caught my eye was the “add 7% to salaries for Oracle database skills.” I get that Oracle costs more, but do we think Oracle data professionals are worth more for that reason? Or because Oracle is a bigger pain in the rear to deal with?

Steve Jones

The Voice of the DBA Podcast

Listen to the MP3 Audio ( 2.0MB) podcast or subscribe to the feed at iTunes and LibSyn.

Default Framing–Window Functions

I’ve been playing with the window functions in T-SQL a bit, and I find them very interesting. They certainly solve some problems very well, in a way that’s much easier than has been available in T-SQL.

However there are some things you need to understand. One of these things is the framing of the window, and the data processed. A quick example will show some of this.

Imagine that I create a table and insert some data:

( hrid INT IDENTITY(1,1)
, player VARCHAR(200)
, team VARCHAR(200)
, hrdate DATE

We add a few row, which I’ll keep short.

INSERT HomeRuns (player, team, hrdate, HRcount)
 VALUES ('Troy', 'COL', '4/7/2013', 1)
      , ('Troy', 'COL', '4/18/2013', 1)
      , ('Troy', 'COL', '4/22/2013', 1)
      , ('Derek', 'NYY', '5/7/2013', 1)
      , ('Derek', 'NYY', '6/24/2013', 1)
      , ('Nelson', 'BAL', '3/31/2013', 1)
      , ('Nelson', 'BAL', '4/2/2013', 1)
      , ('Nelson', 'BAL', '4/20/2013', 1)
      , ('Lonnie', 'CLE', '5/9/2013', 3)

This is a small set of data. Let’s imagine that I want to count the total home runs by team in each month. If I try to do this with windowing, I’ll get something like this:

  , datename( mm, hrdate)
  , HR.hrdate
  , sum(HR.HRcount) over (partition by month(HR.hrdate), team)
 from dbo.HomeRuns HR

When I run that, I see all the rows returned, which isn’t what we expect from aggregates. However it’s also not any kind or running total or examination of the data in a row by row processing that many window functions perform.

That’s not completely accurate, but it’s a feeling many people get when starting with these structures. However the results highlight something. Let’s look at them:


We can see that for April, for Baltimore, we see 2 rows, with a total of 2 for each row. There was one home run hit on each day, and the total is 2, but both rows are processed as one window.


That’s because the framing, the section of the partition that’s examined by the window aggregate, is the “"RANGE” of the partition by default. The entire partition, so all rows in front of, and behind, the current row, are used for the results.

This is a simple example, but it does show that you need to be aware of the default, which I don’t love. I wish the default were ROWS, and I’ll talk about that another time.

CI and CD Aren’t Magic

I’ve been studying and talking with lots of developers and DBAs about Continuous Integration and Continuous Delivery for a few years. Many technical people are excited about the possibilities and look forward to trying to automate their builds, their testing, and improving their software. However there are no shortage of concerns about the cultural problems of getting both technical staff and management to change the way they perform development.

These are very valid, and very real concerns.

CI and CD aren’t magic. Just like Agile, Pair Programming, or any other methodology, these development techniques don’t produce better software by themselves. There need to be cultural changes in how an organization views software and an investment in learning to adhere to the process and apply solid software engineering processes throughout a project. Merely adopting new process without changing your view on testing, and on accepting and using the feedback, will not create better software.

It’s a bit of a leap of faith to agree to implement testing earlier in the development process. The results of that additional work don’t readily appear, and certainly code will be written slower. It’s a stretch for many people to think that fixing problems returned by a CI process and maintaining a clean build will pay off over time. I agree, and I’ve questioned the value myself. However I also see that companies implementing these changes produce better software over time, and more reliably. If they really change their culture to believe in CI and CD.

However the better evidence, to me, is that companies that continue to produce software the way they have for years, continue to produce software with lots of bugs, that’s also over budget and late. Perhaps that’s good enough for many companies, and that’s sad. I hold out hope that anyone producing software, from managers to developers, and everyone in between, would want to do a better job with their next project.

Steve Jones

The Voice of the DBA Podcast

Listen to the MP3 Audio ( 2.7MB) podcast or subscribe to the feed at iTunes and LibSyn. 

Avoiding a DBA’s Worst Days with Monitoring

SQL in the City Abstract: When things go wrong with a database, it can be the start of the worst day of a DBA’s life. Join Steve Jones as he examines the problems uncovered by The DBA Team and how you can prevent them with proactive monitoring and in-depth knowledge of SQL Server.

  • General Abstract: A DBA usually has a bad day because they are unprepared for issues that commonly occur or unaware of situations that can cause problems. Learn about the five things Steve Jones finds to be most important for DBAs and how you can be ready to handle issues in these areas:
  • Backups
  • Space
  • Security
  • Resources
  • Deployment

This session does include Red Gate tools but explains how issues can be avoided with your own utilities.

Slides: DBAsWorstDays.pptx

Placeholder resources:

Custom Metrics used in the demo:




Off to London

Today I’m off across the Atlantic again. SQL in the City 2014 kicks off in London and I have 3 talks to give on Friday. Plus a keynote.

Today is keynote practice, last minute packing, and then off to the airport for my flight overnight to London. This will be another quick trip, and although I think it would be good to spend a few days in Cambridge at the Red Gate offices, I’m so focused on SQL in the City, as well as this being my third trip this month, I didn’t think it made sense. I still have a week in Seattle coming, so this has been a tough time.

I am a bit excited about the event. We have a new venue, and we’ve worked to fit a number of talks together in a sequence that I think can help get people moving forward in a Continuous Delivery software+database development process. I really think this is the way to build better software, and I want to see us jumpstart development on SSC in this manner in 2015, and hopefully get continuous work being done.

I’ve also got a new talk based on the DBA Team articles, and I hope everyone likes it. I tried for a bit of humor, so we’ll see. If it does well, I’ll do it in Seattle. If not, I’ll be reworking things next week.

Once again work blends into the weekend, though not by much. I’ll be heading back from the UK Saturday morning, so I’ll miss a half day in Denver, though it will be a long day in all for me. My flight will leave around 1am Denver time, so by the time we hit Saturday night, I’ll be a bit worn out.

Searching for a Laptop Bag

I was in San Jose recently for the Silicon Valley Code Camp and when I picked up my backpack in the morning at the hotel, an edge caught on the desk and my zipper pulled loose. Not what you want to have happen when you’re transporting a laptop that you use for work.

This has been a good backpack for me during the last couple of years, but as you can see below, it’s wearing out.

Photo Oct 20, 5 27 30 PM

The zipper pulls are fraying, the Velcro doesn’t stick as well, and now the zipper has issues. For a free bag, I can’t complain ,but I think it’s time to move on.

Past Choices

I’ve had more than a few bags in my life. Early bags came from vendors, and I’ve had no shortage of conference bags over the years. This was a good one, but I found the flap to be annoying to me, and I’ve sworn off messenger bags.

Photo Oct 20, 4 07 22 PM

I had a stage with my bad knee (and aching back), where I used roller bags. I had this great Targus for a lot of trips, and really enjoyed it. I could put in some clothes and plenty of gadget, and make this a single bag on short trips.

Photo Oct 20, 4 07 38 PM

However. I’ve also found that airlines have moved to smaller jets where possible, I often do have another carryon, and this doesn’t fit under a seat (often) or overhead (in smaller planes). As a result, I went searching for a smaller roller.

My wife used to use this nice leather one, and I tried it for awhile. However it had a few issues.

Photo Oct 20, 4 07 08 PM

It also doesn’t fit under seats well (too wide), and it’s got a frame, so the size doesn’t change much. However the other issue is that it’s hard to maneuver with a second bag. It doesn’t stand up by itself, and the handle doesn’t easily fit over a luggage handle, so it’s a pain.

The Search

I started on Twitter, and got a lot of recommendations. Far too many were for messenger, shoulder style bags, which people seem to like, but I don’t. I also didn’t want a bare bones, super small backpack.

My son has a nice, military style Maxpedition bag, but I don’t love the single sling. It’s a bit of a pain to get on/off without unclipping and don’t want to be doing that. However it is durable as can be.

When I look at reviews, I see all kinds of different bags and features. There’s an amazing selection. That’s good and bad, but it certainly makes me think about what matters to me.

One of the first companies that popped up for me was Everki. I’d never heard of them, but for some reason I clicked through and started browsing their backpack bags. At first I dismissed a few models that claimed they could store an 18” laptop as I’m never getting one of those. I’ve had a 17” model before and didn’t love it. As of now, I’m always searching for the smallest machine I can find that takes 16GB. Soon it will be 32GB, but I’m not ready for one of the W540-sized machines yet.

As I looked, I watched a few of their videos, and I have to say that while I hadn’t considered the fold flat to be a feature (TSA doesn’t care in many places), I did like the fact that I often get stuff stuck down in the bottom of my bag now and have to search around. I also liked the hi contrast orange inside, because surprisingly often I can’t see inside my bag.


I settled on the Versa for one main reason: the sunglass case. It’s also in the Concept, but I didn’t want to spend $300 (though for some reason $200 didn’t seem too bad). However I usually want sunglasses with me when I drive, and I’ve even found them on my head as I get to the TSA line and have to slip them into my bag, where they’re not well protected. Yes, I know I can take a glasses case, but I’d need 2 and I find those to be a pain. It’s not rational, but I’d rather have it built into the bag, a place I can drop stuff.


I think this bag will be similar to lots of other bags that are in the price range and ta

I’ve found with luggage that I get better bags (usually) for more money, and I’m hoping this will last me a few years. I spent $150 for a roller that I really like and think it was worth every penny. It’s lasted 4 years and still is going strong.

I won’t get this before my trip this week because I waited too long to order it. However I’ll have time to pack it next Monday and see what I think, with the chance to order a different bag before I leave for PASS.

I’ll update a review next week with first impressions.


Get every new post delivered to your Inbox.

Join 4,805 other followers