Author: way0utwest

  • Recovering from Bad Deployments

    Someone asked me recently if I stored backups of my database in version control. This person wanted to recover from a bad deployment and use a backup to do so. They felt that keeping a copy of the backup in a VCS, alongside the code being deployed, would be important. It might be, but I said that recovering from a bad deployment isn’t something I want to do with a restore if I can avoid it. Then I was asked how to recover from a bad deployment if you have a busy, 24×7 environment.

    I, of course, answered, “it depends.”

    It does depend on the deployment, but it also depends on your preparation. There are ways in which you can work to minimize the problems that might occur during a deployment. Obviously testing your scripts and deployment process is important, but it’s also good for you to understand how your scripts work and what techniques you can use to rollback problematic deployments.

    There’s a switch in SQL Compare that lets you build a deployment script, and then immediately generate a rollback script. It’s handy, but it’s also not going to always work. If you’ve added a column during deployment, you might not want to just remove it on rollback. 

    However you can prepare for issues, like having a script that might save data in the new column before you remove it. You might choose to copy the table as part of a pre-deployment process (or during deployment), having this copy of the table used in a rollback scenario. You might even bring up a warm copy of your database and prepare to swap entire databases if problems arise. This would allow you time to save and move data that was changed after your deployment, but before your rollback.

    There are lots of possibilities in how you might recover from a failed deployment, but as with many of the solutions that we build in technology, a well thought out plan makes everything run smoother.

    Steve Jones

    The Voice of the DBA Podcast

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

  • Toshiba Portege Z30

    My co-worker, Grant, got a new laptop a couple months ago. He’s had some bad luck with machines breaking, and as a result, he got a Toshiba Portege Z30. I had the chance to see it last month in Washington DC, and it’s a nice machine. It’s got all of the things I like:

    • Core i5
    • 16GB
    • thin and light (2.6lbs)

    Those are really my requirements, but it goes a bit further. It’s got a nice touchscreen that looks great. It has a tiny AC adapter, along with a touch pointer in the keyboard. I went with a Lenovo last time mainly because of that little touch device that lets me use the mouse without moving my hands.

    It’s about a pound lighter than my Lenovo, but with a better screen and about a pound less AC adapter weight. I thought, “that’s a nice machine, good for Grant.” I thought that I’d wait and see what was coming out in 2015 and if there might be a better tablet/convertible in the new year with 16GB of RAM.

    Then my machine crashed.

    It actually just died twice on the road trip and a couple more times at home. It would power off for no reason. Fortunately I had no corruption, but with this machine being a bit dated and having been on dozens of trips, it’s getting old. I was thinking of a replacement in 2015, and the crashes accelerated my timeline.

    z30

    I like Grant’s machine, and it has the added bonus of us having the same hardware, which should make it easier for us to get support from each other and our IT group. I ordered one, and am hoping it will arrive in January in time to let me spend a few weeks with it before my trip to Germany.

  • Beware of Login Issues for Privileged Accounts

    In a recent post, I described an attack against a privileged account using a simple SQL Injection technique of updating data in a table. One of the things showed was an administrator using their user and password credentials, but being unable to log on.

    pwd6

    In this case, the administrator might easily assume there are mistyping their password, try again, and at some point reset their password.

    NEVER DO THAT.

    I mean, you might need to reset your password, but don’t take this lightly. If you are logging in with a privileged account, and you should do this sparingly,

  • Staying Successful

    This is an interesting piece on data predictions. There’s a college that’s using data to help students, but not in the way you might think. Rather than customizing learning plans or finding more efficient ways to teach, the college is analyzing data to find students that might be struggling with college life overall and intervening early to help them cope with college and continue to move forward in their studies before they drop out.

    This is similar to something HP has done, trying to predict if employees might leave and intervene to see if something can be done. I heard an interview with the HP managers, who praised the program, and found they were among the most likely candidates to leave the company. However HP also realized that identifying people likely to leave allowed their HR people to try and find creative ways to retain their employees.

    I’m not entirely sure this is a process I’d like to be a part of, but it does seem like HP is doing well in their experiment. They realize they can’t solve every issue and keep every employee, but they can work proactively to try and reduce the losses. However privacy is a big part of this data analysis and I hope HP keeps that in mind as they move forward.

    Steve Jones

    The Voice of the DBA Podcast

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