Tag: tools

  • Keeping Track of my ConEmu CLIs

    I use ConEmu for my terminal interface. I’m still on Windows 10 at home, and for consistency’s sake, I run this on my Win11 laptop and the home machine. I love it, and it keeps my windows together, so that I can run multiple command prompts.

    However.

    Sometimes I find myself in this situation. I have a bunch of prompts open, and I’m not sure what is what. I know the current one is one of my Flyway projects, but what about the other 4?

    2026-09_0129

    I was flipping through them recently and thought there has to be a better way. As you can see, some have a folder, but some don’t. What I really want is some organization.

    I learned I can right click the header and get a menu. Notice the “rename” in here.

    2026-09_0130

    I can type a new name then for the tab. I did this for my last (right-most) tab below:

    2026-09_0131

    Now I can see where all my tabs are focused. I’ve had a tendency to pop a new tab for a new task, as I sometimes have different things going on as I multi-task, or really, as I wait for someone to respond so I can complete the task in a window.

    2026-09_0132

    I wish I had an auto-mapping of some sort that might rename these for certain things, but this works well for now. I usually only have 4-5 open, and if I change the task, it’s easy to rename a tab. I tend to do that when I realize I’m looking for something and the name is wrong.

    If you use the Windows 11 terminal, it can run multiple prompt and you can rename them as well, but if you’re still on W10 or lower, think about ConEmu. I’ve loved it for the last 5-6 years and it’s worked well. Plus I can have it slide down from the top if I want.

  • No Shortcuts for the SQLCMD Batch Terminator: #SQLNewBlogger

    I was messing around with SQLCMD and I realized something I hadn’t known. I’ve never tried it, but the batch separator has to be separate, which I’ll show.

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

    The Batch Terminator

    The default batch terminator in SQL Server tools is “GO”. We tend to use this in SSMS, and many of us know to type this in SQLCMD when we use it. In SSMS, we sometimes need it. Here’s an example where I create a proc and add a RETURN, which some people think means the proc ends.

    It doesn’t.

    2026-05_0092

    The SELECT @@VERSION is a part of the proc. Now, if I drop the proc and then add a GO at the end of a line, , I get this:

    2026-05_0093

    Makes sense. Let’s try two commands. In this case, the GO is skipped and I get two results.

    2026-05_0094

    Using SQLCMD

    If I run SQLCMD and enter that code, I get a new prompt. That’s because the batch separator in SQLCMD is a batch terminator. This is in the SQLCMD docs, and since I haven’t terminated a batch, nothing happens.

    2026-05_0095

    If I hit enter, I get a new prompt. This continues until I enter a go.

    2026-05_0096

    Once I enter Go, I’ll see my results.

    2026-05_0097

    A good thing to know, as you might think you can enter “select * from @@version go” and think it might execute. It won’t, as you see below:

    2026-05_0098

    This isn’t likely a problem for most people as they’ll instinctively enter GO if something doesn’t run, but newbies might miss this.

    SQL New Blogger

    This was about a 10 minute post, based on an experiment to see if I could get something to run quickly. Since I ran the experiment, I captured some screenshots and built this post.

    Showcase continued learning, especially in this era of AI where you might need to guide an LLM along a better path.

  • A Tool is Better than a Script

    While working with a customer recently, I heard this sentence: a tool is better than a script. The reference was that this customer preferred a known, tested, approved tool for most of their staff rather than a script built, lightly tested, and perhaps changeable by anyone in their organization.

    I was surprised, because in many ways, I’ve depended way more on scripts, more often, than “tools” in my career. Often I struggled to find tools that actually worked in the way I wanted them to and built them myself with Unix shell utilities, VB Script, PowerShell, or some combination of those or other technologies.

    I asked them if they wouldn’t prefer to customize things and let one of their senior people write their tools. They said that it wasn’t necessarily a problem for a few people, but too many people might edit and change the script, even the senior people, and then others couldn’t depend on them. They weren’t sure if they were reliable if a known script wasn’t being run. Even among their senior people, someone would edit a script then they thought something wasn’t quite right, or there was a new requirement and then the script would return unpredictable results.

    I felt they didn’t completely trust their staff, but I also understand. I’ve changed my own “tools” and broken them or gotten back incorrect results. Depending on what the script did, and how busy I was, I might not even notice the problems. That might cause me problems if I expect data or actions to occur one way and they work differently.

    Scripts can be changed by anyone.  The results might not be what’s expected on a team. I get that. At some point in my career, I put all our DBA “scripts” or “tools” into a version control system and we had a path to the trunk (main) branch of them that was read-only, so that we knew what was being executed. If we wanted to change the script, we had to open an branch in the repo, make our edits, and then have another DBA approve the change before it would be merged into the main, and subsequently pulled into the folder in our path. This didn’t prevent changes, but it did give us some versions and history of changes.

    There’s a balance between flexibility and customization that is challenging to tread amongst team members. Sometimes a known, reliable execution is better than one that changes too quickly. We’ve been asked at Redgate Software to ensure people using Redgate Monitor can audit what actions are taken in the tool. Sometimes a team member changes a setting, such as an alert threshold, and other team members aren’t aware. That can impact their ability to diagnose problems when they assume the tool works one way, but it’s actually working another way.

    Tools we decide to use, whether purchased or OSS, won’t always do what we need. There is a requirement to build our own, but we also need some expectation and assumption of how they work. Especially in a team. I don’t want to have to re-read the code every time I run a tool; I should know how it works.

    At the same time, I can’t have every tool change each time someone wants something new. I love sp_whoisactive, but I depend on it working a certain way and wouldn’t want Grant to change how it reports data unless I know about the change.

    Working in a team requires teamwork, which means that whatever type of tools we buy/download/build, we need to ensure we all are aware of how they work.

    Steve Jones

    Listen to the podcast at Libsyn, Spotify, or iTunes.

    Note, podcasts are only available for a limited time online.

  • Tools You Need

    This is the oldest editorial we have on the SQL Server Central site. This is being re-run for the US President’s Day holiday as Steve is on vacation and we are celebrating 25 years of SQL Server Central.

    I was browsing the web recently and caught this note on coders and their tools and a related article on must have tools. It seems the focus was more for programmers and network administrators, but there are definitely some good tools in the list for DBAs to understand.

    However, since it’s Friday, it got me thinking…

    What are your essential DBA tools?

    By these I mean those pieces of software not included with SQL Server, that you find very handy. It can be a utility that serves some purpose or a programming aid, I’m wondering what tools outside of those that come with SQL Server do you consider essential.

    For me I have to say that the one tool I find most handy right now is Litespeed. I’ve used this utility for backups to save space for years. We made a deal a long time ago with DBAssociates, who developed the tool, and we’ve stuck with it. As of now we’re quite a few versions back since Imceda and then Quest took over the tool, but we’re happy with the way it’s worked.

    That’s not to say other products aren’t just as good or even a better value, but that’s the one tool I’ve found most handy for me with SQL Server.

    So are you using compare tools? Programming IDEs? Something else I’m not thinking of that has proven to be an essential SQL Server DBA or developer tool?

    Let us know. You might just make someone’s day.

    Steve Jones