I’m getting a Macbook Pro!

SQL Server

MacbookPro.pngYES! YES! YES!

Or as they say in the World Cup, GOOOOOOOOOOOOOOOAL!

My boss knows about my lust after the grooviness known as the Apple Macbook Pro, and he just scored me the coolest project. I get to be the pilot guy for supporting Macs internally. I’m way psyched.

Now for the wild part – figuring out how to do my work on it. I’m a SQL Server database administrator, and I already know the Microsoft SQL Management Studio doesn’t work on Macs, but I’ll be using Parallels Desktop to run that. Beyond that one application, though, I’d rather get everything running natively on Mac OSX wherever possible – after all, that’s the entire point of supporting Macs internally. If the user’s just running Windows apps, then there’s no support difference.

And besides, Mac-native stuff would just be cooler, muhahaha.

Ernie goes to the vet


Ernie in bedErnie and I took a trip this morning to Animal General Hospital, and Dr. Campbell says she’s got a rash. Might be scabies, but probably not, and he didn’t want to do the required skin scrape test on her right now with the skin being so sensitive.

She got a shot in the bottom to prevent the itching short-term, plus a couple of prescriptions for anti-itch and antibiotics.

I’m watching the World Cup finals between Italy and France. The rest of the world is on to something – soccer is a lot of fun to watch. The action is nonstop, the athletes are really skilled, and there’s less time for commercials. Woohoo!

Microsoft System Center Operations Manager 2007 Review


I spent some time yesterday going through an evaluation of the upcoming release of Microsoft Operations Manager 2007, and figured I’d share my evaluation notes with you, dear reader.  I’ve used MOM before, and I wanted to see what was new.

I’m looking at SCOM 2007 because I’d run into a showstopper with UniCenter: it can’t monitor my 64-bit machines. Since we’re going into production with 64-bit SQL Server for the data warehouses, I need a short-term (6-12 month) solution that will handle the 64-bit monitoring until UniCenter has 64-bit agents ready.

Server Monitoring Features I Need

My main criteria in order of importance:

64-bit OS and Application Monitoring

I’m looking for both operating system monitoring and application statistics monitoring. It’s not enough to just see that a 64-bit system is up – I need to know application events, like when SQL Server is running out of log space for a particular database. UniCenter is able to gather this data, and so should my short-term solution.

Easy To Deploy & Maintain

This system has to reduce our workload, not increase it. My goals for deployment are:

  • Monitoring system deployment in 1 day
  • Install agents on each server in 1 hour
  • Add & edit users and alerts in 5 minutes
  • Have everyone on the Windows group able to do those functions in less than one hour of training

There are plenty of monitoring products out there that achieve the rest of my goals, but miss on this ease-of-use one. I’m intimately familiar with ServersAlive, for example, but if I’m the only guy in-house who can maintain it, and it takes me one day a week, then we’re worse off than when we started.

Simple Monitoring Dashboard

Email alerting is good, but when a whole bunch of things go wrong at once and then get fixed, like during a network outage, I want to be able to see what’s still broken at a glance. A good example of this is UniCenter’s display up in the CORE. Bonus points if that console is accessible via a PDA.

Server Performance Trending

Right now, I’m manually gathering statistics on my machines via Windows Performance Monitor one week per month. I assemble that data into Excel and run calculations on it to stay on top of my machine health. Unfortunately, that takes about a day per month to collect, report and analyze. I’d like to automate that process. (UniCenter does this.)

With these goals in mind, I evaluated Microsoft Operations Manager 2007 Release Candidate 1. The product is mostly done, but things like documentation and polish are still hit-or-miss.

SCOM 2007 Review: Positives

SCOM 2007 is 64-bit capable.

It monitors 64-bit operating systems and applications seamlessly. The agents install and work fine without a hitch. OM2007 automatically detects and installs the appropriate 32bit or 64bit agents, including SQL Server 2005 64-bit.

SCOM autoinstalls the right agents.

To add a new server, right-click in the Administration console and click Discovery Wizard. By default, it will scan your AD forest, but that’s not a good idea here since we’re just evaluating, so instead, click Advanced Discovery, click Next, click Browse For Computers, and click the Browse button to search the AD forest. It will ask for an admin account to install the agents, and click Other Account to use your own account if you’re an admin on that box (or a domain admin).

It then checks your servers to make sure they’re not already managed, and then asks you which management mode you’d like to use (agent or agentless). If you choose to use an agent, it will ask which account the agent should use – just use the system account.

SCOM2007 detects the operating system (Win2000 vs 2003 vs 2003 64-bit) and installs the appropriate agents.

Even better, it automatically detects supported applications like IIS, Exchange, and SQL Server, and installs the right agents for those as well. The whole process is very transparent – I didn’t even have to tell it which servers were running SQL, and which ones were not.

Bottom line: I can add a new server within 1 minute, which is way better than I’d expected. Note that after the agent is installed, it takes several minutes before health data is reported.

It’s easy to add and edit email notifications.

Adding new users takes less than a minute and requires no special skills. To add a new user, go into the console and click Administration, Notifications, Recipients, then right-click on Recipients and click New Notification Recipient.

Adding new subscriptions (alerts) is also easy. Right-click in the Administration console and click New Subscription Notification. A wizard steps you through all of the choices like which applications to monitor (Windows, IIS, SQL, etc), what levels of alerts (health, maintenance, performance, etc), and how often to send reminders.

It has a great monitoring dashboard.

The console can be installed on laptops easily, and can run over the VPN. It gives a great heads-up view of the servers.

It has in-depth application health reporting.

It has deep visibility into SQL Server health statistics, and even the default settings gave me useful information. For example, it alerted me when a database shrank itself, which is a major no-no for enterprise databases.

It has a maintenance mode.

I can put servers in maintenance mode before doing work on them. That way, when I’m rebooting a machine to fix something, no false alarm emails go out. I actively used this feature in ServersAlive at my last company, and I’ve asked for the same ability in UniCenter too. When a sysadmin group is really living by these alert emails, every reduced false alarm means a lot.

System Center Operations Manager 2007 Negatives

It still has annoying bugs.

For example, I can’t always edit my email subscription – when I right-click on it and click Properties, the entire System Center console crashes and quits. Another example is that personalized views aren’t always saved correctly, and the sort order is reset when you go from one screen to another. Maybe these bugs will be fixed in the final release, but again, maybe not.

You have to know your application’s vital stats.

Like UniCenter, SCOM2007 can send a dizzying array of notifications. For a successful implementation, the sysadmin of each box needs to understand what they’re monitoring. When I first told it to send me everything, despite only monitoring a handful of servers, I got about 150-200 emails per day – only about 10 of which were useful. I’m now in the process of whittling down the notifications.

The console requires horsepower.

It runs about the same speed as UniCenter’s tools on my P4 laptop, which is to say slow.

The dashboard is not web-accessible.

In order to manage SCOM2007, you have to install the console or remote desktop into a machine running the console. Long-term, I would prefer a web-accessible portal like UniCenter’s, and in a perfect world, it wouldn’t require Java either, so I could run it from my handheld. But now we’re just talking crazy.

What I Didn’t Evaluate

Server Uptime Reporting

It’s integrated with SQL 2005 Reporting Services and does some data warehousing as well. This was way outside of my scope of needs, though: I don’t anticipate long-term use of this as an uptime tracking tool or statistics analysis system. I’d rather get back to UniCenter for performance monitoring when its agents become available.

Agentless Auditing

OM2007 has the ability to monitor systems without installing the OM2007 agent, and it can even audit event logs without an agent. For the purposes of this evaluation, I wanted to install the agents because I wanted in-depth reporting on the applications (SQL Server and IIS).

My Recommendation

Operations Manager 2007 achieves the requirements so well and requires so little effort that I would recommend we deploy it for a short-term 64-bit monitoring solution.

Ernie goes to church


.flickr-photo { border: solid 2px #000000; }
.flickr-yourcomment { }
.flickr-frame { text-align: left; padding: 3px; }
.flickr-caption { font-size: 0.8em; margin-top: 0px; }

Ernie goes to church, originally uploaded by BrentOzar.

On Lincoln Road, no less.

IBM UpdateXpress Server worthless


This past week, we had an IBM guy come in for a quick-start session on implementing IBM Director. Maintaining dozens or hundreds of servers can be a chore, and Director is supposed to make it easier by automating hardware checks, firmware updates, and even phoning home when there’s a problem.

Part of this package is IBM UpdateXpress Server, a central repository for all of the IBM firmware updates. Admins are supposed to set up Director, point it to their UpdateXpress repository, and then match up to see which servers need which updates – and deploy them easily from inside Director. This beats doing a sneaker shuffle around the datacenter, carrying CDs and floppy disks from machine to machine.

The reality didn’t match up with the promise. UpdateXpress Server is horridly out of date. It fetches internet updates from a different web server than the public hits, and that server is way behind what the public server has. For example, our x460’s have had several critical bios updates in the last three months, and none of those updates were available to the UpdateXpress server.

That immediately set off alarms with the IBM guy, who couldn’t believe what he was seeing. We repeated the same update tests with other servers (x346’s and x366’s) only to get the same results. None of the firmware updates that had come out in the last 6-9 months were available inside UpdateXpress Server.

To make matters worse, IBM Director only allows Windows software packages to be deployed – not floppy images. When a bios update comes out only on floppies, like the CPLD updates for the x460’s, Director can’t do anything about it. It’s still time to do the sneaker shuffle. Since these updates often come out simultaneously, some in Windows and some in floppies, then I’m really not saving any time at all.

My experiences have been echoed by others who had bad experiences with UpdateXpress Server. I only wish I’d seen these on IBM’s forum before we bought the Jump Start package.

We were all disappointed with the results, and I’m posting this just to warn anybody else who’s considering the IBM Director jump start program. IBM’s servers are phenomenal, but the firmware update system is just as bad as the hardware is good.

Lusting after the new Apple Macbook


macbook20060516.pngOh yeah, I gotta have me one of these.

Here’s the deal: as of about a year ago, Apple started moving their entire lineup over to Intel processors instead of Motorola ones, which means Apple computers can run Windows. During the boot process, the user can pick which operating system they’d like to run – Apple OSX or Windows. That’s great for those of us who still have to use Microsoft programs at work, like me. I make my living working with Microsoft SQL Server, and I can’t imagine trying to administer a database without the new SQL Server Management Studio. It doesn’t run run on Macs, doesn’t run on Linux, etc – ya gotta run Windows.

So now, I could either boot into Windows, or I could use Parallels, a slick piece of VMware-like software that lets you run Windows inside a Mac.

This was all good, but until last week, the only Intel-based Mac laptop was $2k – a little too pricey for me. Now there’s the new $1100 MacBook, and that’s a heck of a cheap price point. They make a black model for $1500, but I’d rather have the white one, actually.

The only question now: how can I get work to pay for it? Heh….alright, who in the company needs a new (used) Dell D810 laptop?

End ofa long, hard day

SQL Server

End ofa long, hard day, originally uploaded by BrentOzar.

I spent the second half of the day building and installing a couple of pizza boxes from IBM. We’re cleaning up our network test lab, mounting flat panels on the walls for easier builds, and just generally making it a nicer place to spend time.

BarCamp coming to South Beach


Yeah, it’s been a while since my last blog post, sorry about that. Life is a blast here, having a ton of fun with things at work, but I’m going to try to catch up on the blog over the weekend.

First things first: BarCamp South Beach! Woohoo! I can’t believe it. My first kinda-Valley-ish experience. I’m excited about it. I haven’t been involved in the geek meatspace since I stopped going to HoustonWireless last year, although I still keep in touch with a few of those guys.

But anyway, back to BarCamp. If you’re in the Miami area, you should check out the planned BarCamp experience and consider signing up. It’s demo-centric, meaning you’re expected to share as well as learn. I’m going to be frantically brainstorming about what I could show off. I doubt the attendees would be much interested in the finer points of database systems that cost $25k per CPU, but I might see if I can put together some demos of how we use Microsoft SQL Server on handheld computers. At the very least, I can help out by bringing projectors or servers from work.

Technorati tags: , ,

Reverse-engineering databases


I’m a big fan of the relatively inexpensive Case Studio as an alternative to the big database design tools. Case Studio does a very competent job at reverse engineering databases, modeling, UML, etc.

The reverse engineering just got a whole lot better with the recent InferRI add-in that can infer relationships between tables even when no relationship is defined in the database. It looks at what fields are the primary keys in each table, and then looks for similarly named fields in other tables. This makes reverse-engineering databases a lot easier for database administrators who don’t like to force the database to enforce relationships, or who take over databases that have never been managed by a DBA before. This thing just saved me a couple hours of work.

The only drawback is that the field names have to be identical. If the Customer table has a primary key of CustomerID, and the Orders table has a field called PurchasingCustomerID, CaseStudio won’t infer the join between the two tables.

Pretty damn good for a first version of the add-in, though.

SQL performance tuning for VPN users


The latest newsletter from the excellent SQL-Server-Performance.com had a tip about doing performance tuning on high-powered machines. If you need to test large queries running inside the server room (meaning, the app or web server runs a big query against the db server), you may not get the speed results you’re expecting if you try to run that same query on your desktop. SQL-Server-Performance attributes this to low resources on the desktop, but there can also be another reason: network bandwidth and latency.

Last week, I was doing performance tuning on a SQL Server that supports users across the United States. One of the applications exhibited very high Duration numbers in the profiles that I ran, and I couldn’t figure out why. Even when I tuned the tables by adding appropriate indexes, the load on the server didn’t improve the way I’d expected. Finally, I found out that this particular application was running on machines in another state – not application servers inside our data centers like we’d typically do. The query results were being piped over their slow VPN connection down to their workstations, and so the Duration statistics were artificially high. Sure, it looked like the queries were taking forever, but in reality, it was just a slow network connection, and there was nothing I could do on the database side to speed that up.

The morale of that first story: never performance tune by looking at a single statistic alone, like Duration, Reads, Writes, or CPU. Use all of them together to gauge what queries are really having an impact.

Technorati tags: ,

Raising the dead…servers


.flickr-photo { border: solid 2px #000000; }
.flickr-yourcomment { }
.flickr-frame { text-align: left; padding: 3px; }
.flickr-caption { font-size: 0.8em; margin-top: 0px; }

Raising the dead…servers, originally uploaded by BrentOzar.

I’ve blogged about more of the downsides than the upsides of my new Cingular 8125, and it’s time for some opposing views.

Stuck in the datacenter working on a dead server, this thing proves its worth. I’m able to take full advantage of some spare time while waiting for stuff to work. I’ve caught up on my emails. I’ve caught up on my voicemail, thanks to our slick VoIP phones that send our voicemails to email. I’m even blogging! Hooah!

Now I just need a pair of Bluetooth headphones so I can whistle while I work.

Why open source will triumph: one big community


South_Beach_Boardwalk.jpgFor the past few days, I’ve complained a couple of times about the lack of testing on my new Cingular 8125. My troubles continue with the MMS integration. The device has a great digital camera, and it has great email support, but do the two work together? Not so much.

1. Take a picture. (I took this particular one yesterday afternoon while walking Ernie down the boardwalk, and I’m only now getting the damn thing into my blog because this process is such a pain in the ass.)
2. Click Send at the bottom of the screen.
3. You get options for each of your email accounts – but not Goodlink, and I can almost understand that because it’s a third-party email client. However, Cingular touts its support, so Cingular should really support it. Bottom line, you can’t send camera phone attachments with Goodlink. But I digress – back to this particular bug. Choose MMS, a picture message.
4. The MMS window pops up, and the first thing is the “To” address.
5. Start typing a person’s name, an email address, or a phone number.

Nothing happens.

When I start typing an email address or a phone number, it should pick from my list of contacts and complete the address for me. Or at the very least, it should pop up a clumsy additional window and let me pick an address from my address book. No such luck. It’s as if my address book on the device didn’t even exist. Come on, man, this device fits in the palm of my hand – why are all of the parts so damned independent?

This brings me to testing. The bug reporting format I used above was copy/pasted from the Flock wiki entry on submitting Flock bugs. If I have a problem with the browser, I can simply submit a bug report like I did this morning. I caught a minor grammatical error and submitted a bug for it. I can then watch the Flock crew react to it, hopefully fix it, and publish the fixed code. I can download the fixed browser and see my contribution in action. The very fact that they’re open to my opinion gets me even more excited about using their product.

Now, contrast that with my Cingular 8125. I shudder to think at what would happen if I tried to report a bug to Cingular. I know they have to deal with a lot more users, and they have to insulate their developers better from their end users, but there should still be an open forum at some point where I can go to find problems other people are having with this device and its firmware. Oh, sure, there are forums alright, but they’re independent third-party phone forums that have sprung up out of desperation because they can’t get what they want from the big companies. But that doesn’t make me more excited about Cingular – it makes me more excited about the forums. Cingular has a chance to build their brand here, build a community of involved users, and they’re missing the boat.

Flock, on the other hand, Gets It. They understand that by building a community of involved users, they encourage their product to grow and spread wings.

SQL Server training for developers: primary keys & indexes

Indexing, SQL Server

I had to do some developer training last week and I wrote up a paper on the basics of primary keys and indexes. Sure, there’s tons of similar stuff around the net, but this is MINE, baby.

Our Table: Phone Numbers

For our evil training purposes, let’s say we work for the phone company, and we need a database table with phone numbers. We need to track:

  • Phone number (required)
  • Billing contact last name (required)
  • Billing contact first name (required)
  • Business name (optional)
  • Business category (restaurant, dog groomer, auto dealer, etc)
  • Address 1
  • Address 2
  • City
  • State
  • Zip
  • Service start date

(Sometimes a person or a business will have multiple phone numbers, but for the sake of this training, let’s keep it a simple flat table.)

We will never have two records in here with the same phone number. We have to tell our database about that by making the phone number our primary key. When we make the phone number the primary key, we’re telling SQL Server that there can be no duplicate phone numbers.

That means every time a record is inserted or updated in this table, SQL Server has to check to make sure nobody exists with that same phone number.

As of the year 2000, there were about 360,000 people in Miami. Throw in businesses, and let’s say our table has 500,000 records in it.

That means by default, every time we insert one eensy little record, SQL Server has to read half a million records just to make sure nobody else has the same phone number!

Every 1 write = 500,000 reads.

Well, that won’t work, will it? So let’s organize our table in the order of phone number. That way, when SQL Server inserts or updates records, it can quickly jump to the exact area of that phone number and determine whether or not there’s any existing duplicates.

This is called setting up a primary CLUSTERED key. It’s called clustered because – well, I have no idea why it’s called clustered, but the bottom line is that if you could look at the actual hard drive the data was stored on, it would be stored in order of phone number.

This is different from a primary NONCLUSTERED key – nonclustered means it has nothing to do with the way the data is stored on the physical hard drive.

So to recap:

  • Primary Clustered Key means 1 write = a few reads
  • Primary Nonclustered Key means 1 write = 500,000 reads

Sounds like a black and white decision, right? It usually is. There are ways to make primary nonclustered keys fast, but it needs to be a very careful decision not taken lightly, because there are a heck of a lot of ways to make them dead slow.

But let’s get back to our phone number table. Now we have the table organized by phone number, and if we want to find people by phone number, it’ll be very fast. While our computer systems will usually need to grab people’s data by phone number, our customers and end users often need to get numbers by other ways. That’s where indexes come in.

The White Pages: A Lookup Index

Our customers constantly need to find people’s phone numbers by their name. They don’t know the phone number, but they know the last name and first name. We would create an index called the White Pages:

  • Billing contact last name
  • Billing contact first name
  • Phone number

That index would save people a ton of time. Think about how you use the white pages:

  • You scan through pages looking at just the letters at the top until you get close
  • When you get close, you open up the full book and jump to the right letters
  • You can quickly find the right single one record

Now think about how you would do it without the White Pages. Think if you only had a book with 500,000 records in it, organized by phone number. You would have to scan through all 500,000 records and check the last name and first name fields.

The database works the same way, except it’s even worse! If a developer wrote a SQL query looking for the phone number, it would look like this:

SELECT PhoneNumber FROM Directory WHERE LastName = ‘Smith’ AND FirstName = ‘John’

That doesn’t say select the top one – it says select ALL of them. When you, as a human being, go through that list of 500,000 phone numbers, you would stop when you thought you found the right John Smith. The database server can’t do that – if it finds John Smith at row #15, it doesn’t matter, because there might be a few John Smiths. Whenever you do a table scan and you don’t specify how many records you need, it absolutely, positively has to scan all 500,000 records no matter what.

If the database has an index by last name and first name, though, the database server can quickly jump to Smith, John and start reading. The instant it hits Smith, Johnathan, it knows it can stop, because there’s no more John Smiths.

Covering Fields: Helping Indexes Work For You

But that’s not always enough. Sometimes we have more than one John Smith, and the customer needs to know which John Smith to call. After all, if your name was John Smith, and the phone book didn’t include your address, you’d get pretty tired of answering the phone and saying, “No, you want the John Smith on Red Road. He’s 305-838-3333.”

So we would add the Address 1 field in there too.

  • Billing contact last name
  • Billing contact first name
  • Address 1
  • Phone number

Do we absolutely need the address in our index for every query? No, but we include it for convenience because when we DO need it, we need it bad. And if we DON’T need it, it doesn’t really hurt us much.

This is called a covering index because it covers other fields that are useful.

Adding the address field to our index does make it larger. A phone book without addresses would be a little thinner, and we could pack more on a page. We probably don’t want to include the Address 2 field, because the Address 1 field is enough to get what we need. The database administrator has to make judgement calls as to which fields to use on a covering index, and which ones to skip.

When building covering indexes, the covering fields go at the end of the index. Obviously, this index would suck:

  • Billing contact last name
  • Address 1
  • Billing contact first name
  • Phone number

We don’t want all of the Smiths ordered by their address, and then a jumbled mess of first names. That wouldn’t be as fast and easy to use. That’s why the covering fields go at the end, and the names go first – because we use those.

Selectivity: Why the Last Name Goes First

If you wanted to search for Brent Ozar in the phone book, you look in the O’s for Ozar first, and then you’ll find Ozar, Brent. This is more efficient than organizing the phone book by first name then last name because there are more unique last names than first names. There are probably more Brents in Miami than Ozars.

This is called selectivity. The last name field is more selective than the first name field because it has more unique values.

For lookup tables – meaning, when users need to look up a specific record – when you’ve narrowed down the list of fields that you’re going to use in an index, generally you put the most selective field first.

Indexes should almost never be set up with a non-selective field first, like Gender. Imagine a phone book organized by Gender, Last Name, First Name: it would only be useful when you wanted a complete list of all women in Miami. Not that that’s a bad thing – but no matter how much of a suave guy you think you are, you don’t really need ALL of the women in Miami. This is why non-selective indexes aren’t all that useful on lookup tables.

This rule is really important for lookup tables, but what if you aren’t trying to look up a single specific record? What if you’re interested in a range of records? Well, let’s look at…

The Yellow Pages: Another Index

When we need to find a dog groomer, we don’t want to go shuffling through the white pages looking for anything that sounds like a dog groomer. We want a list of organized by business category:

  • Business Category
  • Business Name
  • Address 1
  • Phone Number

Then we’ll look at the list of businesses, see which name sounds the coolest and which address is closest to ours, and we’ll call a few of them. We’ll work with several of the records.

Here, we’re searching for a range of records, not just a single one.

Notice that we didn’t put the most selective field first in the index. The field “Business Name” is more selective than “Business Category”. But we put Business Category first because we need to work with a range of records.

When you’re building indexes, you not only need to know what fields are important, but you have to know how the user is fetching records. If they need several records in a row next to each other, then it may be more helpful to arrange the records like that by carefully choosing the order of the fields in the index.

When in doubt, experiment. Create two or more indexes with the same fields, but in different orders. Then check your query execution plan to see which index gets used.

One Phone Book per City: Partitioned Tables

When we’re dealing with a lot of data, sometimes we partition the same data into multiple tables. The phone company separates its customer list into cities, for example, so that there are separate tables for Miami and for Fort Lauderdale.

When customers want to look up a phone number, they grab the Miami phone book. They don’t want to look in the Fort Lauderdale phone book for someone who lives in Miami.

But how do they know which book to use?

They look at the front of the book, where it says “Miami, Florida”. This is a constraint: this book is constrained to Miami numbers only.

Constraints Define Partitions

Constraints help us because it means we don’t have to put fields like State in our index. When our users are looking at a single entry in the phone book, they don’t have to wonder which State the entry is for. The book is constrained to State = ‘FL’.

Databases need constraints too. We might create a table called OrderHistory_FL, and put a State field in it. However, our poor little database doesn’t know that only FL orders are stored in this table, because the table name doesn’t mean anything. We have to specifically create a constraint on the state field.

When the database server builds query execution plans, it looks at the constraints on each table and uses that knowledge to help build a better execution plan. If it knows that it will only find states of ‘FL’ in a particular table, then it knows it doesn’t have to do any work when the query says WHERE STATE = ‘FL’. The database already knows that all records in that table match the constraint – just like if I tell you to find me all of the John Smiths in Miami, you don’t have to call each of the John Smiths in the phone book and ask them if they’re actually in Miami.

Quibbles with the Cingular 8125


After working with my new Cingular 8125 for a few days, I can say it’s a keeper. As soon as my memory card gets here, I’ll probably even stop carrying my laptop home during the week. I haven’t even started putting 3rd party applications on it yet, but I can say that it’s going to be my primary electronic device outside of the office.

Every single good feature, though, has the oddest drawbacks that point to insufficient testing.

Good: the keyboard buttons are huge and make typing a breeze. Bad: there are so many buttons scattered all over the damn thing that it’s almost impossible to hold without accidentally triggering the camera, voice dialing, comm manager, etc. It’s great for short-term typing, say one paragraph or less, but anything longer than that is risking disaster. It’s just too easy to accidentally start another application right in the middle of typing a paragraph, and then depending on what keys you’re in the middle of pressing, you might trigger disaster. I’ve started phone calls to people, deleted files, taken pictures, etc, all while trying to just type a letter.

Furthermore, with so many multi-purpose buttons liberally slathered all over the phone, why take up onscreen space with visual buttons that have the same purpose? There’s a dedicated hardware button for the Comm Manager – why take up an entire line of the “Today” screen to show one tiny icon for it as well? And don’t get me started about the location of the Power button: when the phone is holstered, the power button is precisely positioned to hit the seat belt socket in a car. Every time I get into the car, I turn the phone on without knowing it, and then as I buckle the seat belt, it places a call. I’m to the point now where I just take the phone off before I get in the car.

Good: two soft keys make it easy to get around in most screens, and HTC even duplicated them above the keyboard for use when the unit is in landscape mode. Bad: these two buttons are so close to the keys that they’re almost impossible to avoid. When composing email, the soft key right above the E will instantly send the email without asking if you’re sure. I looked like an idiot when I sent out three partially completed emails in a row to a group of execs. Not good. If this setup was tested, it was tested by somebody with needles for fingers.

Good: the 8125 comes with a stereo earbud headset with microphone, and it makes a killer wireless walkman. I love walking the dog while listening to Jimmy Buffett’s Radio Margaritaville over the internet, all live. Bad: the earbuds are huge. We’re talking mammoth. I don’t have small ears by any means, but I can’t keep these earbuds in my ears. They pop out at the slightest provocation because they’re apparently designed to fit in Ernie’s ears. There’s no way anybody tested these before deploying them.

Good: the camera takes great pictures for a PDA/phone. The picture you see here was taken outside at dusk with minimal lighting. The camera is very light-sensitive for a simple PDA, and a $300 PDA at that. Bad: despite buttons scattered all over the surface of this device, it’s impossible to change most of the camera settings without getting out the stylus.

Good: underground firmware available on the web enables Microsoft Direct Push email with Exchange. Companies using Exchange Server 2003 with SP2 can enable push email out to PDA’s and phones without paying for GoodLink or Blackberry Enterprise Server setups. It works pretty well out of the box with no configuration. Bad: while the push email does work, it isn’t anywhere near the speed of GoodLink or Blackberry devices. I routinely got emails on my PDA several minutes after they arrived in my inbox – not acceptable for “instant” email. Thankfully, our company uses GoodLink as well, and one of the network guys hooked me up with a GoodLink account. Presto, the emails arrived on my 8125 even before they hit my laptop. That’s what I call push email!

Good: wifi reception is better than I expected. Bad: the phone doesn’t intelligently switch over to WiFi for browsing when available. I’ve even had to manually shut off the GPRS connection just to force all communications to go over the available WiFi connection just to get the fast speed. Totally worth it, though – this device makes for a completely workable web browser from the couch during TV commercials.

Good: the device works pretty well as a phone, and the big screen means the onscreen buttons are large enough to actually work for one-handed dialing. Bad: it doesn’t come with support for A2DP, the new stereo Bluetooth profile for headsets like the droolworthy Jabra BT620. It doesn’t even come with some of the more basic features I expect in an intelligent phone, like the ability to set custom ringtones based on the caller. Come on, man, don’t let my shiny new PocketPC phone get outsmarted by a $50 Nokia.

All of the annoyances I’ve mentioned are minor. The best review comes from everybody who sees this thing in action. They all seem to say the same word: “Whoa.” The screen is big and bright, the keyboard buttons are better than a Treo’s, and it runs Windows Mobile 5. At $300 from Cingular, it’s a heck of a deal. I don’t buy new gadgets as often as I used to, and I’m completely confident in buying this thing right now. It’s the best PocketPC phone on the market today, and it’ll be a long time before anything better hits the stores at this price point.

My first blog entry from a Cingular 8125


Take two.

It’s hard to write a glowing review of a piece of consumer electronics when the damn thing crashes every half hour or so.

As I was saying when I was so rudely interrupted by a frozen screen, my new Cingular 8125 has everything from WiFi to Bluetooth to a full-blown keyboard.

Make that a half-baked keyboard. The keyboard, like the rest of this rebadged HTC Wizard, has a few annoyances that mar an otherwise amazing experience.

Take the keyboard backlighting, for example. At first, I was amazed that the keyboard lighting worked so well. After a few minutes, though, I got aggravated by how quickly the backlight turned off. The keyboard doubles up every letter key with punctuation or numbers. The only punctuation mark with its own key is the period. To use a question mark, I have to find it on the keyboard, then hit the modifier key and the key. If I don’t find it in time, the backlight cuts off, and I have to hit some random key to turn it back on, then backspace, and start looking again for my punctuation mark. Typing becomes a sort of masochistic race against the clock.

But who cares, right? I’m lounging on the couch blogging from my phone! I’m even listening to Jimmy Buffett’s Radio Margaritaville streaming audio out of this thing’s stereo speakers WHILE I TYPE! It’s a freaking multitasking phone! This little machine is way more fun than a $300 phone has a right to be. And the camera quality is spectacular. Just look at at the picture attached to this blog entry!

Oh, wait. That’s right. I can’t get the thing to email a decently sized picture because it keeps timing out trying to send an mms message. Another annoyance.

Every feature I’ve tried so far has a similar drawback. Thankfully, it looks like everything has a workaround so far. It crashes unexpectedly, so I’ve already learned to pen my blog entries in Word instead of the web browser, saving them every few minutes as I go. Like any good relationship, it’s all about compromise. You never get exactly what you want. You have to put up with a little flakiness in order to get the good stuff. So far, the Cingular 8125’s a good balance between the two.

Teaching people programming


My new job’s going extremely well, having the time of my life. I’m working with a group of very competent programmers who’ve produced a whole lot of code, but without the luxury of having their own database administrator. As a result, the database is in truly horrendous shape. As an example, I spent about an hour tuning indexes for a nightly job that’s been taking 4-6 hours to run. After tuning, it takes 1-3 minutes. MINUTES.

Does that make the programmers incompetent? Of course not. They’re very good at what they do, but they’re not database administrators. They know enough to be dangerous, but not enough to scale enterprise apps.

Another guy in the company (not you, Carlos, if you’re reading this – it’s another guy) asked me how I became a database administrator. I explained that I got started programming, and eventually took on enough database administration duties to do it full time. It’s a good fit for me because I’m much better with databases than I am with programming – debugging sucks – and I really enjoy it.

The guy then asked, “So if I was going to start becoming a database administrator, what would I do?”

I was kinda caught off guard. I don’t have a good answer for that. I mean, I have plenty of good answers, but only for people who are already doing network administration or programming. If you can do either of those halfway well, then you can be a database administrator. But to start with DBA work, with no prior programming or network administration? I wasn’t quite sure how to answer that. It struck me as a get-rich-quick scheme, and further conversations with him have proven that to be his motive.

Today, I read Peter Norvig’s excellent Teach Yourself Programming in Ten Years, and it does a fantastic job of explaining my feelings on this subject. Don’t expect to jump into anything – programming, network administration, database administration, etc – and be an expert in 24 hours, regardless of the book titles down at Barnes & Noble.

My new humble abode

1 Comment

My new office
Change of plans. Southern Wine & Spirits, where I’ve been consulting since October, decided at the last minute that they wanted to bring me on permanently to work directly for them. They’re a fantastic group of people, and they made me an offer I couldn’t refuse.

Pictured here is my new cube. It may not even be my permanent cube – there’s a slightly quieter cube available right outside Don’s office, and I’ll probably swipe that one instead.

Squint closely at the picture and you might be able to make out my Dell Latitude D810, Dell flat panel, Cisco VoIP desk phone, and Cisco 802.11b cordless handset. Muhahaha, new toys….

I’ll probably be slacking off on the blog entries this week and next while I get up to speed in my new duties. It’s the same company, but a completely different set of duties.

Job hunters – your web site is your brochure.

Professional Development

Last week I wrote a series of postings for employers, and this week I’ll touch base on things candidates should know.

Candidates: you are a product, and your web site is your brochure.
Managers: read the brochure just as you would a new product.

These days, we buy everything online.  We read the product’s web site, get excited by the marketing, and we’re sold on it even before we walk into the store.  Heck, we might not even walk into the store – we might just pick up the phone or buy it online.

Candidates: your personal web presence is your second chance to build a powerful, persuasive brand.

Managers: before you do a phone screening with a candidate, Google their name and see what comes up.

I’ve hired people strictly based off their web site.  If their web site is engaging, funny, knowledgeable and powerful, then they’re going to represent my company well too.

Candidates: always keep a clean name online – not just when you’re looking for a job.
Managers: check not just their personal site, but their online history through time.

Search for a candidate’s name online, and sometimes their personal postings on message boards show up.  For example, a database administrator candidate may show up in SQL forums asking questions about how replication works.

Here’s where the fun starts: compare the datestamps on their online messages with their resume history.  Are they posting Java questions at a time when they said they were working as a DBA?  Are they posting in-depth questions, or questions that you would have expected them to already know by that point in their career?

I’ve been doing this kind of candidate research since 2000-2001, and while I’m still in the tiny minority, it won’t last long.

Candidates: put your web site in the body of your resume, not at the top.

Recruiters chop off all of the personal contact info at the top and bottom of resumes.  I’m guessing they don’t want the company calling the candidate directly, only going through the recruiter.  Whatever.

The problem is that they keep chopping off the candidate’s web site, which is a big piece of the candidate’s resume.

The secret is to put it in the “Experience” or “Qualifications” section of the resume, like “Posts SQL Tips at BrentOzar.com.”  That way, recruiters won’t be as likely to lop that part off.

If your resume is in a Word doc, make sure the web site is a hyperlink, so it jumps right out in blue text. When a manager sees that link, it’s almost impossible not to click it. It’s like candy for a baby.

Include it in the signature of your personal emails, too, so when you’re corresponding with a recruiter, they’ll be just as tempted.

Don’t look dumbfounded or bashful when someone says they pulled up your website. Be excited and proud. “What did you think? What was your favorite part?” If you’re not excited, the interviewers will believe they stumbled across something secret, and you’ll look like an idiot.

Candidates: add some marketing fluff to your resume.
Managers: assume the resume might have some marketing fluff.

Show your personality and your knowledge in the site. Include pages about your interests to show that you’re a real human being. Don’t be dry and boring in an attempt to be inoffensive.

Marketers will tell you that you need to build a personal connection with your sales contacts. The more things you have in common with your sales prospects, the more they’ll bond with you. Your own web site should identify as many things as possible that you hold a genuine interest in. My site, for example, covers my travels, turtles, server monitoring, and other wacko things that I love doing.

Managers – caveat emptor.  Not everything on the candidate’s site may be the full truth.  I’ve seen candidates post blog items like books they’ve read recently, only to find out they didn’t actually read the book.  (Very common with business books and trendy tomes.)  I’ve also seen candidates post SQL how-to articles and code snippets, only to find out they completely copy/pasted the content.  If something looks impressive, copy/paste a particularly unique snippet into Google.  See how many other sites have that exact same content, and that’ll help track down plaigarism.

Hiring the Best DBAs: From a DBA Perspective

Professional Development

A few more collected notes from my recent interviews:

Sell Them On Your Company Right Away

In your company’s reception area, have a few pieces of relatively up-to-date reading material about your industry, or even better, about your company in specific.  The company I ended up choosing, had a great marketing booklet describing the relationships between various branches of the company and their clients. That one brochure actually put me in a great frame of mind before walking into the interview, because it gave me a good, positive outlook on the company and how they treat their customers. Marketing material works just as well on prospective employees as it does on prospective customers.

What’s Your Motivation?

During the interview process, ask each candidate what motivates them. It’s a trick question: not only does it tell you about the employee, it tells you what they’re probably not getting in their current position. (I didn’t realize it was a trick question until long after I was done answering – and isn’t that the best gauge of a trick question?)

Do You Help Others?

Ask candidates if they contribute to any open-source projects. It’s a long shot – even in this relatively open-source-friendly age, us contributors are definitely in the very, very small minority – but if the candidate answers yes, you might have found a really big winner. Ask them to talk about what projects they contribute to, why they do it, and what they’ve learned while working on open source projects. There’s no right answer here, but just knowing that a candidate is that fired up about technology tells you something.

Who You Gonna Call?

Ask candidates, “When you face a very tough technical problem, are there any forums or discussion groups that you like to use?” Make exact notes of the sites they quote, and then go to those sites looking for their posts. I know, it sounds slimy, but this will tell you what kinds of questions they ask and what kinds of answers they give to others.

Get A People Person’s Opinion

If your company has salespeople, consider asking one of the people-savviest salespeople to interview the best candidates after they’ve already passed the technical part of the interview. In my humble experience, salespeople tend to be better judges of people than us technical people. The salespeople I’ve worked with could “read” a person in a matter of minutes and catch interesting things about a candidate’s personality that I’d never notice. Salespeople make a living out of judging people’s interest in a product, and they can do a great job of judging a candidates interest in your company.

Move Fast When You Find The Right Candidate

Agile companies, companies that make quick and accurate decisions, will grab the best employees. Slow, lumbering companies with tons of red tape will get the leftovers. Why? Because agile companies quickly decide whether or not they’ve got Mr. or Mrs. Right, and make that candidate an offer without waiting to go through all of the candidates in a metro area. I interviewed with a downtown Miami company who declared I was a great candidate, said they wanted me, but said they wanted to interview a few other people first. I liked their management style, liked their employees quite a bit, and enjoyed spending time with them. I even envisioned my shorter commute with glee. However, they took their sweet time and made me an offer almost a month later – at which time, I’d already taken an offer. A bird in the hand is worth two in the bush. Slow, lumbering companies, on the other hand, will only get the employees that the agile companies passed over.

More Articles on How To Hire and Interview DBAs

Show candidates their work areas, and get their reactions

Professional Development
1 Comment

When hiring a new IT worker, take a few minutes to give them a tour of the group’s work environment. You don’t have to go so far as to point out, “Here’s the cube where you’d be sitting,” but try to give them a general idea of what the typical work area looks like. At some shops, all of the programmers get their own offices, and at some shops all of the programmers are packed in two to a cube. Showing the general work area sets basic expectations for the candidate.

This is not for the candidate’s sake. Forget the candidate for a moment.

Ask the candidate, “How does this work environment compare to your current company?” Then ask, “And how does this compare to the other companies you’ve interviewed with?”

This is your chance, Imaginary Employer Corporation, to find out how your office looks at a very first glance to a prospective employee – and to a prospective customer! Watch the candidate’s reaction carefully, and read between the lines. Examine what they say, and link it to their current employer’s size, sales, and industry.

I know the dot-com days are long gone. Nobody installs foozball tables or free soda machines anymore, and nobody gives programmers corner offices with a view of Biscayne Bay. But as an employer, how often do you get the chance to tour your competitors’ offices? Because when it comes right down to it, everyone else is competing for the same talent you want. I had one interview where I was mentally calculating how much I’d have to spend in order to make my office livable, and another interview where I was mentally calculating how much of a salary cut I would be willing to take in order to work in a particularly posh environment.

Your office may not be your pride and joy, but it’ll be a part of the job negotiations. If you acknowledge that, and take it into account as part of your offer package, you can make a better offer that the candidate will be more likely to accept.

More Articles on How To Hire and Interview DBAs