Author: way0utwest

  • Fixing the PoSh Hotkey in ADS

    I installed the PowerShell (PoSh) extension in ADS recently. This is available in the extension pane, and once installed, you get the 4th icon on the right added to your sidebar, for PoSh.

    2020-09-10 15_07_51-poshtest.ps1 - Data Analysis - Azure Data Studio

    I have the SSMS Keymap extension installed as well, since that was the first one I grabbed. This gives me keymapping to allow CTRL+E to execute queries. I have literally a decade of muscle memory here, and really wanted this to work.

    However, when I highlight code in ADS and press F8, which is what I do in VS Code, I get this:

    2020-09-11 14_42_34-poshtest.ps1 - Data Analysis - Azure Data Studio

    Not only is my PoSh code in the editor tab not executed in the Terminal, but the Server Connection pane pops open.

    This is because that’s what keymap does for F8. I can use the command palette to debug this.

    2020-09-11 14_44_14-Keyboard Shortcuts - Data Analysis - Azure Data Studio

    If I open up the keyboard shortcuts and search for F8, I find that a number of things use this.

    2020-09-11 14_44_21-Keyboard Shortcuts - Data Analysis - Azure Data Studio

    The last binding is the one that’s in effect, and you can see that the Show Connections overrides the PowerShell item.

    Fortunately, I can edit this by clicking on the left of this line.

    2020-09-11 14_45_41-Keyboard Shortcuts - Data Analysis - Azure Data Studio

    Once the dialog pops up, it is there to capture any keystrokes, so it’s hard to get a picture of this. However, with a little experimenting, I remapped this to CTRL+L, which has some bindings, but these aren’t ones I use.

    Now I see PowerShell as the last item, and if I close this tab, and go back to my code, I can press F8, and I’ll see the line executed in the terminal.

    2020-09-11 14_47_45-poshtest.ps1 - Data Analysis - Azure Data Studio

  • Daily Coping 28 Sep 2020

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

    Today’s tip is to remind yourself that you are loved and worthy of love.

    Words are powerful. Mantras, visions, repeating phrases to yourself has been shown to be powerful. For many of us, there is love, a caring and affection from others. This is usually true from partners and family, but I think it’s also a part of the #sqlfamily.

    Many others in the this SQL Server, data platform community pull together and help each other. They express caring, listening, and more to each other. If you’ve ever been to a SQL Saturday, the PASS Summit, SQL Bits, Data Relay, and more, this is often visible. There is a camaraderie that I often don’t feel at more formal, and many for-profit, events.

    We are all worthy of love. I don’t know how else to say this, and if you don’t feel this, repeat this to yourself over and over: “I am worthy of love.”

    Or send me a note on Twitter or Linked In. I’ll listen and let you know you are worthy.

  • Do You Know What the Settings Should Be?

    One of the research areas at the Redgate Foundry is in estate management, trying to better understand how people manage an estate of servers. These could be physical servers you own, VMs in a hosted or cloud situation, or even a platform service like Azure SQL Database or AWS RDS. In today’s world with a myriad of choices, it’s easy to lose control of your estate of servers.

    I saw a quote recently from someone that was struggling with their estate. They said: “The moment it goes red, if you don’t know what it should be, then you’re clutching at straws.”

    This particular person was struggling with rebuilding systems after a failure. If one of your VMs dies or gets removed, something that is easy to do in the cloud, do you know all the settings to rebuild it? Not just the CPU and RAM, but all the SQL Server configuration settings you might have changed? These days there are lots of database settings, which ought to be in those backups, but there are plenty of other items that could be hard to recover.

    Most of us don’t experience large disasters in our instances, but we do get regular calls, tickets, and complaints about performance. We might even find out that settings get changed in a team environment that we are not aware were made. Monitoring systems might catch this, but not necessarily every little setting that we care about. Building your own system is complex, and more importantly, I find that ensuring all new instances and databases that get deployed are in your system is hard.

    I didn’t think much of this project when it started, but I realized this is more of a problem for people when I attended a session at SQL in the City London in 2019, where our Foundry presented on a few projects. I had assumed that most people would be thrilled with the Spawn project, but most were more interested in estate management. Lots of interest in having software to ensure you not only know what your settings are, but when they might change and how to get them back.

    Part of building software, especially with DevOps, is ensuring you know how well it is, or isn’t, performing and if the things you change are useful and valuable. Certainly this is important for those DBAs and system administrators, but I think it’s also important to ensure you share those settings with developers. Having all your systems configured in the same way through the software process helps ensure more consistent performance.

    Some sort of estate management is important, and no matter how you might monitor systems, ensure that you are including the various configuration settings as a part of that.

    Steve Jones

    Listen to the podcast at Libsyn, Stitcher or iTunes.

  • Daily Coping 25 Sep 2020

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

    Today’s tip is to get outside today and give your mind and body a natural boost.

    Easy one for me today. I’m off, so I’ll be outside working on my extension cord. Last weekend my daughter and I rented a trencher and dug a hole from the barn to a middle pasture. We’ve struggled with water out here in the winter, with some weird PVC and extension cords cobbled together. It worked, but not well, and it was only intended for short term work.

    5e4848c4-334d-46ce-b039-177f93fa77a1

    As we’ve realized we will have horses here for most of the winter, I decided we needed power out here, and the best way to do this in a low impactful and cost effective way is to set up two outlets, connected by wire underground. This is protected from horses, isn’t permanently wired to the barn, and if something trips or breaks, we can isolate this from the rest of our system.

    A very hard afternoon got the wire buried. Today, I wire up outlets.