Author: way0utwest

  • The Journey to PostgreSQL (or anything)

    Most of you reading this work in technology, and I assume that you’ve had to learn something new on the job. Technology is constantly evolving, even on our existing platforms. On top of that, we are regularly given tasks that are outside of our current skill sets. Maybe not far outside, but to meet the changing demands of our jobs, we need to learn new things.

    I ran across an interesting post (on a new site) from Brent Ozar. I think that guy writes as much as me, but he wrote this one: Why I Started Using Postgres (And You Might Too). It’s a little provocative, but there are good posts on the site about things Brent learned in PostgreSQL. I won’t go into whether learning PostgreSQL is a good idea.

    The thing that struck me in this post is that Brent knew that this move was a risk. He was worried about moving to a new platform, despite all the reasons he had for doing making the change. I would bet a lot of us are in similar situations. It might not be PostgreSQL we are being asked to learn, but it could be Fabric, Databricks, Python, PowerShell, CosmosDB, or whatever other thing someone in our organization thinks is cool.

    The best sentence in here is this: “I gambled that I’d be able to learn how to do performance tuning quickly enough, …, in time to head off issues.” That’s the attitude I’ve often had in my career when I get requests to do something new.

    I’m willing to bet on myself.

    You should be willing to do so as well. Not bet on me, but on yourself. I know you don’t want to work 80 hours a week to learn, or get stuck trying to solve problems every weekend with new tech. However, I hope you are willing to do that for a week or one weekend. You’re willing to do some reading at night or experimenting during lunch in order to make something work.

    You’re going to have tough times. You’re going to question if you can make something work. Getting comfortable with being uncomfortable (for short periods) is how we grow and learn. It’s how we take leaps forward.

    It’s how we take advantage of opportunities that are in front of us.

    There are always opportunities to make a difference, to effect change, to build something you are proud of or that your organization values. Those stressful times when you drive to make something new succeed and have to learn a new skill in the process, these are the times when you can take advantage of an opportunity.

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

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

  • A Broken Copilot Query

    I was testing the new SSMS (v22 Preview 3) with Copilot and ran into an interesting issue.

    This is part of a series of experiments with AI systems.

    My Query

    I was working on something unrelated and tried this prompt, which should have saved me a few minutes from looking on MSLearn.

    2025-10_0168

    As you can see, I get a nice list of things. However, then this happened.

     

    This kept going. I gave it a minute, then opened my screen recorder (which is close to a minute) and started recording.

    After capturing this, I stopped the query. Things seem to work OK, but this is definitely something that concerns me about agents and letting them go. I don’t know if this was a stuck process, if this was consuming compute or tokens, but it was certainly an issue.

  • We Should Demand Better

    I ran across an interesting open letter. Most of these are from individuals, often complaining or lamenting on the way something in the world works, or maybe doesn’t work.

    This latest letter was from the Chief InfoSec Officer at JPMorganChase, a large worldwide bank. This open letter was written to the software suppliers looking to do business with JPMorganChase, especially those in the SaaS area (Software as a Service). The letter opens by noting that SaaS is enabling cyber attackers and asks for three things: prioritize security over features, modernize security architecture, and work with security collaboratively to prevent abuse of connected systems.

    It’s a good letter. It talks about the problems at a high level, but is specific enough to recognize problems. Software is often delivered as a SaaS type application, even when there might be local components. For example, I lament Postman working this way, as it now seems to now require me to be connected in order to work. That’s something I learned while trying to get work done on an airplane, and I couldn’t get to any of my queries as I didn’t have wi-fi, despite the application running locally on my laptop.

    The threat of more attackers is amplified by the connectedness of new systems, new agents, and new protocols that allow a breach to escalate deeply inside systems. This is something we’ve faced in the past, but not at the scale that we face it today. Automation has become embedded in the computing world, not just inside organizations, but also inside hacking organizations. Malicious actors can and do use scripted attacks at a rate that we haven’t experienced in the past.

    I wish that most people purchasing software would prioritize security when making a decision, but often price and expediency outweigh anything else. While I do see many companies asking for security information, too often the requests are at high levels, and vendors can word their answers in a way to satisfy the screen without actually improving their own security coding and architecture.

    I do think the authorization and authentication of users is improving, so I have hope that more patterns and frameworks are published and widely used, and we’ll see more consistent security throughout software. Now, if we can just ensure the authors of those platforms do a good job of security, we might see the request from JPMorganChase come true.

    Steve Jones

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

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

  • Prompt AI helping with Auditing

    I had a conversation with a customer asking this question: how can I tell who called a stored procedure so I can audit the action?

    I decided to see if Prompt could help me here.

    This is part of a series of experiments with AI systems. This is also part of a series of posts on SQL Prompt. You can see all my posts on SQL Prompt under that tag.

    The Setup

    I had this code, which is a simple stored procedure. I sketched this out, but I’m looking for a function to add to my code that helps me audit the caller.

    2025-09_0128

    I opened the Prompt AI (ALT+Z) and asked the question you see in the image. I also asked to assign it to the variable, but didn’t exactly specify everything.

    2025-09_0129

    In the image below, you can see the code that changed. Prompt AI added the System_User function, which is exactly what I wanted.

    2025-09_0130

    I accepted this and then asked to change this to the user instead of the login.

    2025-09_0131

    Again, the function I wanted was added: CURRENT_USER.

    2025-09_0132

    I know what I needed, or I had an idea. However, if I wasn’t sure what function to use or if there was one, this is handy. I’m working inline, rather than going to a browser and hitting Books Online or Googling for the answer. I can keep coding or looking at my code as the AI runs.

    If I ask for an explanation, I get one, which helps me judge if this is actually the code I want.

    2025-09_0133

    If you have SQL Prompt, get Prompt AI a try by opening it with ALT+Z.

    If you haven’t tried SQL Prompt, download the eval and give it a try. I think you’ll find this is one of the best tools to increase your productivity writing SQL.

    Video Walkthrough

    I show this live in the video below.