Author: way0utwest

  • A Great Case for Powershell

    I think PowerShell is a great addition to the Microsoft stack. Given the previous versions of VBScript, Perl and Python ports, and more on Windows, PowerShell is a great improvement. Even for someone that spent a lot of time in the C Shell and Bourne Shell as a student and young professional, I think PowerShell is an improvement. There are certainly still things that make me crazy about PoSh, such as the -eq, but I’m getting more comfortable with the structures and flow.

    In SQL Server, we had the old SQLPS module, which was, well, a start. Then we got the SqlServer module, which is better. However, the best thing I’ve seen for us data professionals is the dbatools project from Chrissy LaMaire (@cl) and company. To me, this is incredibly useful for anyone that wants to use PoSh with SQL Server, but it’s really indespensible for SQL Server migrations from instance to instance. I’m not sure I’d even try anything else at this point.

    Not everyone wants to use PoSh with SQL Server, and that’s fine. There are certainly plenty of places where T-SQL works very well to manage and interact with SQL Server. I still prefer it for many things, but the more I work outside a database, whether for administrative actions or manipulating parts of the platform away from SSMS, PowerShell has some advantages. Not the least of which are cleaner file operations and certainly better string manipulation (IMHO).

    Recently I saw post from Drew Furgiuele about finding linked servers in your object code with PoSh. It’s a long, somewhat convoluted post, and some of you might wonder if it’s worth the effort. Hint, it’s not worth the effort because Drew has done it for you. He’s got the function on Github, and if you need to move linked servers, just use his code to help.

    My point is, however, that doing this in T-SQL would be a nightmare. Just going through search isn’t helpful, though SQL Search is a great tool. The work to find the objects would be hard, and this isn’t something you want to get wrong in a migration. It would be bad enough to have errors for non-existent linked servers, but it might be worse if you had code pointing to the wrong database. This is something you’d want to fix, and PoSh helps work with a complex problem here.

    There are other issues like this, other problems or requirements that look across instances or more intensely at parts of our systems outside of what we want to do with T-SQL. Certainly anything at scale, that might be something you do for many instances is better with PoSh, and certainly any infrastructure as code items that work to stand-up and configure SQL Server really should use PoSh.

    Don’t make PowerShell a hammer, and try to solve all issues, but for the future, you really ought to be sure you are comfortable reading PoSh scripts and know how to use them with SQL Server. Learn when PoSh is a good alternative, and certainly know where you can get scripts or help with your code.

    Steve Jones

    The Voice of the DBA Podcast

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

  • Editorial Republish: Mercenary

    I’m out at the Redgate Data Privacy Summit today, so I’ve republished Mercenary.

  • Ten Years at Redgate

    This year was my 10th anniversary of working for Redgate. The actual date was a bit ago, but they held off my celebration until I came over. These are nice at Redgate, better than at some companies where I’ve seen someone in management just give a mention during a company meeting and a token gift. At Redgate we get a really nice gift, which was a Garmin Forerunner 645 for me.

    IMG_20180517_125604

    At Redgate, the CEO comes around and does a 5-10 minute speech on the person, with some of his thoughts and memories, and also shares some stories that others in the company have sent in. There is usually a few embarrassing notes, and in my case, I got this picture, which is likely one that everyone thought would generate the most red from me. It didn’t, though I don’t think there are any really embarrassing pictures or video for me.

    IMG_20180517_125721_523

    There was actually another 10 year anniversary the same day, for Tom Austin. He got a nice bike to ride, and got to share an embarrassing karaoke video with the company. Tom definitely turned red.

    It’s interesting because I’ve known our CEO for almost the entire lifetime of his company, since 2002. He was the first customer of mine at SQLServerCentral and now almost 16 years later I’m working for him.

    He had some nice things to share, and I also got to stand up and speak for a few minutes about my memories and the times I’ve enjoyed with the company. It was nice.

    I also got a large custom card, full of photos. Some memories from it:

    A goofy picture at some event. I saw a camera and made a face. It’s also neat to see myself dressed up for our annual awards at Christmas.

    IMG_20180517_132338

    So much of my time at Redgate has been events, many of which have gone off amazingly well thnks to the efforts of Annabel (center below). She and I have traveled all over the world to lots of cities, venues, restaurants, and even a few running trails. My boss, Alice (below right) has been to a few, and we’ve shared lots of good times. Sometimes that wears me out.

    IMG_20180517_132342

    SQLServerCentral is most of my career, but I definitely to get the chance to interact with customers and talk about our products. Of course, I’m on lots of stages, some of which are like speaking in a movie theater, which I’ve done as well.

    IMG_20180517_132350

    The great Grant photo, but also some good trade show memories. My wife on stage with me at the Christmas awards. I’m thankful for all her support.

    IMG_20180517_132347

    The current evangelism team. It’s a goo done. Not sure where I got that hat, but it certainly fit with my outfit at the Pass Summit. I also have enjoyed the times I’ve traveled with Carly to lots of events. She is amazing, and I miss her support and work ethic this year as she’s on maternity leave. At least she came to the office one day and let me hold little Elliot for an hour.

    IMG_20180517_132332 (1)

    I assume the top photos are from our 2012 SQL in the City tour of the US. The second one certainly is Chicago. Another great awards photo, which I was honored to host with our CEO last year.

    IMG_20180517_132327 (1)

    And the infamous horse photo. For one of our promotions, we wanted some different shots around Cambridge. At one point we went to a playground, and me being me, I jumped on a tow horse. The photo guy took at bunch after being slightly shocked at my antics.

    Planning

    We track these dates and a month or so before, the person’s manager needs to start collecting stories and planning a meeting for the employee’s anniversary. It’s a combination of a tribute and a roast, which the employee gets some input into. They pick their gift, since we want them to have something they’ll use. They also get to decide who comes, the entire company, one group, etc.

    What’s strange with me is that I don’t know a ton of people in Cambridge, since I’m in and out, and we’ve had decent turnover. The guy that had his party an hour before me invited quite a few people, maybe 50-60. One of our popular IT guys had probably the whole company in Cambridge, well over 100 people, for his event a year or two ago.

    I also can’t always remember who I know and don’t know, and it’s been a busy spring, so I decided to stick with my small Marketing group. I was more concerned I’d think to invite 20 people and then forget about 10 more, so a small ceremony for me. That’s fine, since I don’t love the individual accolades.

    The work, which is a few people at random times across a month, and a few others that stop to think about their time with the employee and share stories, isn’t a lot, but it’s also not insignificant. This is a distraction, but it also helps us bond and be a little closer, celebrating a milestone together.

    More companies could learn from this. It’s probably a $1000 ceremony with the gift, and certainly with the CEOs time, but it’s worth it.

  • Music City Data

    I’ve never spoken in Tennessee. I’ve wanted to visit, but the I’ve only managed to drive through a part of the state or transfer in the airport. That changes at the end of this month.

    Music City Tech, a three day conference consisting of Coding, Agile, and Data tracks, takes place in Nashville on May 31-June 2. It’s at Vanderbilt University, and there are a lot of great sessions on the schedule.

    I’ll be delivering two talks, one on DevOps and one on security/encryption on Saturday. I’m looking forward to the conference, with some great .NET and development talks on Thursday and Friday, with a nice spread of data talks on Saturday.

    If you’re near the area, you can get tickets for a very reasonable price for the conference. I hope to see you there.