Today I was tagged by SQL Ninja Brent Ozar after he was tagged by Chris Shaw for this brief SQL DBA Quiz. His quiz requests that I name two mistakes I’ve made in my career. As someone who celebrates his mistakes, of course I will have to oblige. The title of my post, is a reference to the Saturday Night Live Celebrity Jeopardy skits where Darrell Hammond plays Sean Connery.
Well, the game is afoot. – Darrell Hammond
As I mentioned in an earlier post, I am a recent transplant to Dallas and one of my first assignments with my new company was a Sales Report. As a classic Type A overachiever, it would be a masterpiece. I completed the rough draft, and then spent an inordinate amount of time checking the details. I had created what I hoped would be approved as the standard way we would present reports in the future. Since I was using Crystal Reports rather than M2M’s VFP Reporting, I had a great deal of flexibility in how I presented the report and included several different smart-looking graphs for the executives to choose from. This was the type of report that a Business Intelligence Specialist includes in his portfolio. There’s only one problem which I didn’t discover until it was embarrassingly too late.
I had asked another employee to check the report for accuracy since I didn’t have the slightest idea whether my sales figures were reasonable for my new employer. I then submitted the report to my new superior, and she remarked that it did indeed look like professional work. “The only problem,” she said, “is that the sales figures are around twice as high as they should be.”
The reason for this was that M2M has a quirky way of tracking sales figures in its Sales Order Releases (SORELS) table, and if you don’t remove any Master Release records you end up with higher sales figures than you should. My previous employer never used Multi-Release so I had completely forgotten about that. Moral of the story, always check the accuracy of the reports yourself. For example, try to find an analogous report in M2M with which to compare your figures. For every time you are wrong, especially if you seem confident that you are right, they will question your figures the next 10 times.
I recently wrote to my live production database by accident. It’s so easy to do with M2M. I had recently refreshed my data on my test server with back ups from my live server. You are using a test server, right? I restored my Data01, Data02, and M2MSystem databases. I didn’t run createdbc because I had not copied my M2M directory over so I didn’t have to change my UTCOMP table.
This was a big mistake. Imagine me making random changes to my sales order and shipping tables, and checking the results of the triggers I had scripted onto them. I’d make a change, and the triggers (which were only on the databases on the test server) would not fire. I was baffled. Eventually, it dawned on me that even though I was on a test server, running M2M directly on that test server, had my M2M data drive mapped back to my test server, the live data tables were actually being modified on my live server. Luckily I hadn’t made too many changes and hadn’t done anything damaging like deleting sales orders and such.
Now, every time I restore data, I make a single change to a sales order and then check my live data to make sure I am not inadvertently making changes there. What mistakes have you made at work, and what have you learned from them?