Category: Blog

  • Off to Live 360

    I am off to Live 360 today, on my last trip of the year. I’m excited to deliver two presentations tomorrow (VSTH03 and VSTH12), but a little sad this is a very quick trip. I’m coming back Friday, so in total I’ll be in Orlando for about 43 hours, I need to sleep, so my time is less than that.

    I haven’t been to this conference in a few years, but I’m looking forward to going back, even though it’s a short trip. I always enjoy these multi-tech conferences because I get the chance to learn something completely out of my area. In my limited time, I’ll learn about Shift Left DevOps security, because it’s interesting and Brian is a friend. I will also try to hit a GraphQL session since I know nothing about it and it works with various db stores. If I can, I might do some prompt engineering as well.

    If you’re at the event, I’ll try to swing by Wed afternoon and be there all day Thur. Feel free to stop me and say hi.

  • Grinding Away: Michael Jordan

    A story from Tim Grover, who was Michael Jordan’s trainer when he was with the Chicago Bulls. I don’t know this is true, but I saw this story posted and I like it (and don’t like it).

    “After every game, I used to ask Michael one question: 5, 6, or 7? As in, what time are we hitting the gym tomorrow morning? And he’d snap back the time, and that was it. Especially after a loss, when there wasn’t a whole lot else to say.

    No discussion, no debate, no lame attempt to convince me he needed the morning off. ‘Are you good?’ ‘I’m good.’ ‘See you in the morning.’ And the next morning, at whatever time he’d decided, he’d awaken to find me standing outside his door.

    No matter what happened the night before—good game, bad game, soreness, fatigue—he was up working out every morning while most other guys slept. Interesting how the guy with the most talent and success spent more time working out than anyone else.”

    Grinding away, getting better at your craft, is something that all of us can do. Whether we want to or not is a separate story.

    Why I like this

    There aren’t excuses for continuing to work on your craft and it takes regular attention. It requires some dedication and commitment to improve.

    Why I don’t like this

    It’s easy to take this to far and think the routine of every day or every week is important. It’s also easy to drive yourself too far. If you want to be the rest of the best, then you need this drive.

    If you don’t want to be the best, but just be really good, then you need to do this often, but give yourself a break at times when life gets in the way.

  • A New Word: Ochisia

    ochisia – n. the fear that the role you once occupied in someone’s life could be refilled without a second thought, which makes you wish that every breakup would include a severance package, a non-complete clause, and some sort of romantic placement program.

    I struggled with this one. I have had quite a few friends in the last few years that got divorced and my heart goes out to them. Some ended up in financial hardships, so oshisia seems like a poorly-timed joke.

    However, I get the idea. I’ve been attracted to someone, enjoying the dating, and then had it end. I’ve also ended it. I get that there is not only the loss, but the anger, the sadness, the wandering, the fear that someone else can easily replace you.

    I think many teenagers who’ve been in love go through ochisia at some point.

    From the Dictionary of Obscure Sorrows

  • Rename a Database: #SQLNewBlogger

    I had someone ask me how to rename a SQL Server database recently. They were doing some development work and wanted to rename databases to test an application. I thought I remembered, but in this post, I show I learned something.

    Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

    Using sp_rename

    I thought sp_rename would work, and sure enough, it did.

    2024-10_0232

    However, I need to object type. If I remove that parameter, it fails:

    2024-10_0233

    The command is looking for an object in the current database by default.

    Technically, I ought to do this to be explicit, naming the parameters.

    2024-10_0234

    I have a better way, however. Note: it’s not sp_renamedb, which is marked for deprecation.

    ALTER DATABASE

    I don’t know when this changed, or if, but you can use ALTER DATABASE to change the database name. There is a MODIFY NAME option for this command that works well. You can see this below.

    2024-10_0235

    This is very clear and seems like better DDL For this process, which can easily be captured as code without worrying about parameters or ordering or anything else. I’d recommend using this.

    SQL New Blogger

    This post took me about 10 minutes to write. Easy. I had done a few experiments and I had code ready (which went to the customer), so I didn’t spend time there. Just rewrote what I did and learned in a few minutes.

    You could do this, add to your blog, and maybe get an interviewer to ask you about this after they saw your post.