This was the Top Activity page from Enterprise Manager today after I inadvertently did something in production that I thought I was doing in test. Yikes! As you can see, activity spiked for almost an hour.

So, what did I do? I wanted to try a different execution plan for one particular SQL so I created a SQL profile and ran a few tests. The profiled plan looked better but was horribly worse (that's why we test these things, right?). However, I had multiple sessions open and thought my testing was happening in the dev environment when it was actually happening in prod. As soon as I realized what I'd done, I dropped the profile and alerted the proper folks so corrective action could be taken. Basically it meant a whole bunch of sessions had to be killed in order to rid the database of hundreds of long-running SELECT statements. It was certainly a red-faced, hat-in-hand, very chagrined moment for me.

But, now that the database is pretty much back to normal I thought I'd use this as an opportunity to philosophize (as my mother would say). Errors like the one I made today happen to most everyone at one time or another if you're in this business very long. We never mean for them to happen. But, being the imperfect human beings we are, sometimes stuff happens. Even though I've very embarrassed about what happened, I followed a rule I was taught as a child and have had reinforced in various endeavors over the years. I owned up to what I had done...fast! I notified the lead DBAs and my management of what had happened immediately. And as it turned out, I notified them just as they were noticing there was an issue and starting to try and figure out what was up. So, the situation was addressed right away. Fortunately, although it looked pretty bad (based on the Top Activity graph), the impacts weren't too horrible overall and things returned to normal without too much user issues. It could have certainly been worse.

So, what's it look like when you mess up? Well, you'll never know how or even if your flubs will have visual evidence as obvious as mine did. But if you own up to your mistakes and work to correct them as quickly as possible, they never seem to be quite so bad. 

And you can bet I'll certainly be extra, super careful which session window I type into from now on!