Author: way0utwest

  • Hands off dbatools updates

    I really like the dbatools project. This is a series of PowerShell cmdlets that are built by the community and incredibly useful for migrations between SQL Servers, but also for various administrative actions. I have a short series on these items.

    One of the downsides of an active project is that updates happen often. I know when I’m working with new versions of Redgate tools, they’ll deliver new builds to me every day if I want them (I usually don’t).

    With dbatools, I find a similar issue, though at a slightly longer scale. I’ll see a tweet or post about a new cmdlet, only to find out that I don’t have the newest version. As a result, I need to update my modules, which means I need an elevated command window, which is distracting.

    I saw a post about someone that built a SQL Agent task to update their server, which I was thinking to do until Anthony Nocentino pointed out Watch-DbaUpdate.

    Install-DbaUpdate

    There’s actually a cmdlet that does what I want. It’s Install-DbaWatchUpdate, and it’s designed to setup a scheduled task that calls Watch-DbaUpdate and updates the module. That’s what I want, so I decided to check it out.

    First, I looked at Scheduled Tasks. In Windows 10, this is the Task Scheduler from the Start menu, and surprisingly, lots of software uses this. Google, Adobe, Microsoft, etc.

    2018-05-22 16_20_00-Task Scheduler

    I then tried the –WhatIf parameter for Install-DbaWatchUpdate, but it didn’t work. I know this is a fun cmdlet, but this should work.

    2018-05-22 16_21_02-cmd - powershell (Admin)

    In any case, let me just run it. I don’t get much detail back.

    2018-05-22 16_23_34-cmd - powershell (Admin)

    If I refresh scheduled tasks, I see a dbatools version check.

    2018-05-22 16_23_50-Task Scheduler

    If you look at the details, this is triggered at midnight and runs once an hour. The PoSh executable is called and it in turn calls the Watch-DbaUpdate cmdlet, which checks for a new version and should let me know if there are updates. Since I’m at the latest version, I’ll have to see if this works.

    So far, so good.

    I even tested the Uninstall-DbaWatchUpdate and it does remove the task.

  • The Oddest Thing

    My desk is a mess, at least, it’s a mess compared to many people’s workspaces. Not as bad as some, but certainly worse than others. I sometimes care and will clean clear things away, maybe even get rid of some items, but for the most part I have an idea where things are and they can stay there. I’m not sure that a neat, ordered space has ever mattered to me. Some of you may feel differently, and I’m sure a few of you can’t work unless the clutter is clear. If you want to share a picture of your space, home or work, it might be a fun distraction today for others to see how you work.

    When I posted the picture of my desk, someone right away noticed that I had a hose clamp on my desk. I didn’t even realize it was there, and likely it got dropped there after making some repair outside and coming back in with an extra one in my hand. I probably dropped it on the desk as I was going to wash up, since my desk is on the way. It never got moved, and it’s actually still there today.

    Most of us use our desks for work, and I certainly do, but I also end up doing research and learning for home or ranch projects. I’ve been known to sit and watch a video on YouTube or read a manual with a tool or piece of equipment in front of me. As a result, I end up with some strange things on my desk, though most are too large to stay for long. After all, I do need to get technical work done.

    Today I wanted to see what you’re collecting. Is it swag from some event, a random item from your life, or even a strange momento you’re proud of. What’s the oddest thing on your desk?

    For me, right now, I think that since I’m a data professional, the hose clamp is certainly an odd item. There are various bits of electronics and parts, all of which make sense, as do the Aleve and souvenir baseball bat from SQL Saturday Louisville. There’s also a chainsaw clutch tool, waiting for me to get a spare hour to take a tooll apart. Maybe the strangest item is a jar of earplugs sitting to one side. Since I coach volleyball, I keep some around, and for some reason the spares ended up on my desk. Since they’re behind a monitor, I think I’ll leave them be.

    Take a look around your space today, post a picture if you like, and let us know what oddities abound for you.

    Steve Jones

    The Voice of the DBA Podcast

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

  • One Week to Music City Tech

    Next week is Music City Tech, a three day conference consisting of Coding, Agile, and Data tracks, takes place in Nashville on May 31-June 2. There are a lot of great sessions on the schedule, covering a lot of software development topics.

    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 next week.

  • Lessons for all of us

    I write a fair amount about career issues. It’s one of the largest tags in my word cloud, and I’m proud of that. I’ve seen too many people in bad jobs for too long, had a few myself, watched my wife work far too hard at times, and lost friends because of a lack of time. All of those experiences have caused me to really think hard about life and how I approach work.

    Don’t get me wrong. I like work, I enjoy what I do, I have a great time writing code and queries and think technology is a great career choice. That being said, it can be a hard job. There are demands to work long hours and holidays, often to deploy changes when the workload is low. Some years, I’ve worked as many holidays and weekends in this business as I used to when working in restaurants.

    That being said, we often think of this as an “easy” job in many ways. We work in offices. We’re well compensated. We don’t have a lot of physical demands, and we can do this job will into our later years if we choose. If you’ve ever worked in a job that requires more physical effort such as construction, you appreciate the ease with which our days pass. If you’ve ever had a boring job, such as staring at the x-ray screen in airport security, you’ll likewise realize most of us are lucky that we get to exercise our brains.

    That doesn’t mean this job isn’t hard. In fact, burnout and high stress are real problems in technology. While some industries might worry about their people getting enough done when working remote, our industry has too many people that don’t know how to stop working. I thought about this as I was reading a post on burnout and looking out for yourself.

    Many of us that work in technology are too sedentary. We sit at desks, we work odd hours and often subsist on poor diets that we’ve built during a lifetime of late night coding sessions. We also accept more blame, demands, stress, and accountability than we should. While I don’t know too many people that have had serious health issues from this work, I do know a few. I also know far too many people that have passed away before they reached 50.

    The downsides of this work can creep up on you. I know I felt a little burned out last year, from too much travel, too many balls being juggled, too much pressure. I made a conscious effort to slow things down and I’m much happier this year. I try to exercise and eat (slightly) better on a regular basis, balancing that out as best I can.

    We work to live, not the other way around. Whether you need fewer responsibilities, more exercise, new hobbies, better connections with friends and family, strong mental health care, or something else, make sure you take care of yourself in this life. It’s the only one you get.

    Steve Jones

    The Voice of the DBA Podcast

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