Category: Blog

  • Going Dark in SSMS

    I haven’t been a big fan of dark mode in many tools, but I’ve been giving it a try in some applications as my eyes age. I decided to try it in SSMS, which wasn’t as easy as I’d hoped.

    I had heard this was coming, then found some notes it wasn’t coming, and eventually landed on Pinal Dave’s blog that shows how to enable it. I followed the instructions, but had this issue in Sublime Text.

    2020-03-19 11_09_26-Sublime Text

    That’s easy to fix. In my case, I didn’t want to restart Sublime in administrator mode, nor did I want to mess with permissions. I decided to use VS Code, since that’s the other default program that appears with many files. I started it in admin mode:

    2020-03-19 11_09_48-SQLQuery1.sql - Plato_SQL2017.sandbox (PLATO_Steve (65))_ - Microsoft SQL Server

    I accepted the UAC dialog and then clicked File | Open. From there, I pasted in this path: C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE

    I picked ssms.pkgundef and opened it. Uncommented the last line for the dark theme and saved the file. Then I restarted SSMS and:

    2020-03-19 11_11_39-SQLQuery1.sql - Plato_SQL2017.sandbox (PLATO_Steve (65))_ - Microsoft SQL Server

    Voila!

    ish. Not everything is dark.

    2020-03-19 11_12_01-SQLQuery1.sql - Plato_SQL2017.sandbox (PLATO_Steve (65))_ - Microsoft SQL Server

    This one is particularly annoying to me.

    2020-03-19 11_12_12-SQLQuery1.sql - Plato_SQL2017.sandbox (PLATO_Steve (65))_ - Microsoft SQL Server

    I did try to alter some items, such as my grid results:

    2020-03-19 11_19_34-Options

    This somewhat works:

    2020-03-19 11_20_54-SQLQuery1.sql - Plato_SQL2017.sandbox (PLATO_Steve (64))_ - Microsoft SQL Server

    I’ll stick with it for a bit, but I’ll have to see how much the white sections bother me, especially with the Object Explorer.

    I don’t know why this is so hard, or why it’s a low priority. When I look at some of the feedback and posts, this is upsetting to plenty of people and it would seem like something that shouldn’t be hard to fix. However, I know this is a thick, old client, and perhaps no one wants to touch the code? I’ve certainly seen that before in other orgs. Perhaps Microsoft isn’t so different.

  • Daily Coping 27 Mar 2020

    I’ve started to add a daily coping tip to the SQLServerCentral newsletter, which is helping me deal with the issues in the world. I’m adding my responses for each day here.

    Today’s newsletter said: Contact a neighbor, friend, or family and offer to help.

    My wife and I live in a neighborhood of large ranches. There are about 18 of us, and a few years ago we all got together to address a few issues. We don’t have an HOA, but we worked together to take care of some legal things for our area.

    We sent out a note to others offering to help if they were struggling in any way with this pandemic. So far, no takers, but we’ve put this out there.

    I’ve also contacted some family to check on them. Not much we can do to help, but we are available if someone needs some supplies, shopping service, etc. for those nearby.

    Honestly, I feel like this didn’t help me cope a lot, because nothing came out of it. I know that likely means people are doing OK, or feel they are, but the inaction and inability to do anything is tough.

  • Moving to a New SqlClient

    DotNet developers, if you’re using the System.Data.SqlClient, stop. Move over to Microsoft.Data.SqlClient now.

    It’s easy to do, well, it’s relatively easy to say that. The actual work isn’t that hard, but it can be a challenge to move assemblies. In any case,  you need to reference the new assembly in your code, and ensure you’ve downloaded the NuGet package.

    Vicky Harp wrote a piece introducing this new provider, and you can find plenty of posts around the Internet (and videos) that explain how to change and why.

    Essentially, when you have the new assembly, you change this line:

    Using System.Data.SqlClient;

    to this:

    Microsoft.Data.SqlClient;

    If you haven’t fully qualified the assembly at the top and did it in code, you can search and replace.

    The big reason for the change is to allow the ADO.NET provider to release quicker and keep up with changes in technology. When the SqlClient has shipped with dotNet or dotNet Core, it upgraded rather rarely, and the pace of change was disconnected from features being added to SQL Server. Now Vicky’s team has responsibility here and is upgrading this at a more rapid pace.

    Let your friends know, and if you see System.Data.SqlClient in a code review, consider trying to refactor that out.

  • Daily Coping 26-Mar 2020

    I’ve started to add a daily coping tip to the SQLServerCentral newsletter, which is helping me deal with the issues in the world. I’m adding my responses for each day here.

    Today I published: Get active, even if you’re stuck indoors, move and stretch

    That’s an easy one for me. I like exercising, but I like a variety. My challenges during the first two weeks of March:

    • Yoga class: cancelled
    • Weightlifting at the gym: closed
    • Snowboarding: resorts closed

    However, I have no great excuse. I let some down feelings get in my way and I struggled to move. I did some yoga on my own, and did some stationary bike riding, but not enough.

    The plan for me now:

    Move every day

    I’ll take a few exceptions if I’m really busy, but not many. I ran every day for four years, so finding 20 minutes a day to take care of myself should be easy.

    Yoga

    I assume the gym will open again, but who knows when. Even when it does, I can’t always go, and I can’t use that as an excuse not to take care of myself.

    My goal is to practice yoga 4 times a week during lunch. Without a class, I’ll be on my own, but there are a few things to make this easier. I can get my wife or kids to participate. They will sometimes, and that’s useful. We can go through some flows together and help each other work.

    I like Yoga with Tim. It’s not for everyone, but I’ve done these when I’m on the road at times. I need to get used to doing this more. If you like him, consider supporting him. One of my co-workers, Annabel, likes Adrianne, so check her out as well.

    I have a stationary bike, and that’s usually my “I’m too busy, stressed, or unfocused to do anything else” choice. I’ll use this a couple times a week to fill things in. As the weather gets better in Denver, I’m going to try and ride outside with my wife more.

    I need to keep weight lifting. I think that is one of the keys to keeping a healthy body as I age. We have some weights in the basement, so I’ll try to get down there twice a week.

    My boss swears by floor Pilates, and does it when he travels. I may give some of these a try.

    Otherwise, I have a standing desk, and I am trying to remember to move it up and down a few times during the day. I also do some light yoga stretching when I am consuming some content (reading, watching, etc.)

    Health matters, and I urge all of you to move more. We sit too much as it is to not ensure this is a part of our lives.

    My