Author: way0utwest

  • Driving Issues with software

    This is an interesting piece, talking about some of the software issues with Toyota and how that might come to be a big problem in the future with cars. As we include more software in cars, we will have more issues, and I am worried.

    I recently had an issue where the battery in the Prius died. The car was in our garage, and without power, you can’t

    • open the truck (where the battery is)
    • put the car in neutral

    In the garage, jumper cables wouldn’t reach. I had only one option, get a portable jumper battery and use that. $40 later, the Prius was running.

    I had a similar issue with an old Honda Odyssey as well when the battery died. However by calling the dealer I learned there was a release switch that allowed the car to move into neutral, where it could be pushed out of the garage and jump started.

    As we embed more electronics, the reliability of those components becomes an issue. Already I think the lack of a mechanical way to get the Toyota into neutral is an issue. On top of that, having locks die and be locked without power is a possible safety issue. The door locks can be mechanically opened, but I worry that might change. Not being able to open the truck was an issue for me.

    Software is even more scary than some of the drive by wire features. Those can be set in EEPROMs that can’t change. Software, however, yikes! Can you imagine some software update that had bugs in it?

    I like more electronics and conveniences in our cars, but it’s getting a little scary as manufacturers look to cut costs and get our the “gee-whiz” features quicker into cars.

  • More Snapshot Backups

    I got some more feedback from my Connect item on allowing snapshot backups. They took notice, but I heard the “this is hard and it takes away from cool items in the next version” message.

    That makes sense, and I understand there needs to be some level of progress. I’m concerned, however, that there’s a lot more of “we need to let halfway done things lie so we can sell more licenses” attitude for the product. It seems there’s a regular push forward for new features, and not enough of a “finish up the old ones” or improve them.

    I’m not saying this is something that needs to be done (with only 4 votes), but I hope that there is a decent amount of consideration being given to suggestions that do get votes.

  • Bruce Schneier – Geek of the Week

    I used to subscribe to Bruce’s monthly Cryp-o-gram and enjoyed it. He’s moved to a blog format, and I think that the content suffers a bit as he pushes things out quicker, but he’s still a great read.

    This week at Simple-Talk, he was the geek of the week for an interview. It’s a good read. I especially like his view on identity theft. Don’t keep trying to prevent people from stealing it, since that’s hard. Instead make it harder to use.

    I’m up for that. Prevent credit cards without applying in person, say at a bank, make it more of an effort to use the data and it becomes less worth it to steal info.

    I do like the idea of two factor auth for my bank. That would make sense for most people, especially if you keep a decent balance.

  • Disaster Recovery at SQLServerCentral

    We had a spammer post a bunch of random, silly posts last week. I knew it was an issue when my email went crazy with posts. I think 10 or 12 people sent me notes about different posts. We also had some issues the same day with inappropriate posts and I was doing a few things at once.

    And I think I deleted a thread.

    At least that’s all I can think of. Someone reported a short time later that a thread appeared to be missing, and sure enough, I couldn’t find it. Old Google cached URLs returned errors and a search of the forum database didn’t find anything.

    So I went to restore things. I VPN’d to the server, started SSMS, and clicked restore, picking a new database name, changed the MOVE options, and clicked "restore.”

    sqlbackuppro[1] And it failed. It couldn’t open the .stb file. That threw me for a minute until I realized it was a SQL Backup file. Makes sense that our IT group would use a Red Gate product for backups. No problem, I fire up the SQL Backup interface, register the server, and find the full backup from last night. I go to start the restore, but there’s a password on the file.

    Grrrrrrrr.

    I have to send a request to IT. It’s annoying, but they run the servers and I’ve let that responsibility go. The servers are also co-located, so it makes sense to protect the backup files. IT responds fairly quickly, and in an hour the database is restored with a new name.

    From there it’s a fairly simple method to restore. I have to prep the table

    SET IDENTITY_INSERT  THREADS ON

    And then since I need to include all the column names specifically (no insert. select * allowed), I use the SSMS Script feature to script an insert. I find the thread ID and include that in a WHERE clause. To be safe, I run the SELECT first.

    SELECT ThreadID

       , Title

       , PostDate

        , UserID

    from Threads

    Where ThreadID = 555555

    It looked good and I then added the insert before this, ran it, and I had the thread back.

    But not the posts themselves. Those are actually in another table, so I had to repeat this process for a new table, first setting identity insert off for the first table and on for the second.

    SET IDENTITY_INSERT  THREADS OFF

    This took longer than expected, mostly because I wasn’t as familiar with the database design (it’s not mine) and I had to go slow with the SQL since I didn’t want any issues on a production system.

    Improvement

    What could I have done better? Two things.

    The first is that I should have restored some transaction logs to get closer to the time when I deleted the post. I was worried about the IT guys getting confused, but I should have tried. It would be good practice for them and we weren’t in a time crunch. Working with someone on the other side of the Atlantic Ocean might have been slow, but it would be a good exercise.

    The other thing is that some user points were lost. The points system is a little weird, and I’m not completely sure how it works since I don’t have someone that can decode the formulas in the front end. I’ve submitted a request to get that formula, but for now I didn’t want to mess with it.

    Summary

    Things worked out, and this type of exercise is something we ought to practice more. I had been working with database snapshots in a test environment recently and was tempted to actually set up a drop and then create of a new snapshot each night so I could do this without a restore. That is an interesting idea for me.

    I also want to remind you that testing your SELECT before doing the INSERT is important. You do not want to compound your mistakes.