Remembering Phil Factor

One of the most prolific and popular authors at Simple Talk has been Phil Factor. He wrote many pieces on all aspects of database work and has probably written more articles on the Redgate Product Learning site than anyone else. He has entertained, informed, and inspired many database professionals in his many years as an author.

Phil, aka Andrew, passed away recently. This was a shock to many of us and a sad day.

Tony Davis introduced me to Phil, whom I always thought of as Andrew, many years ago when I first traveled to Redgate. Tony published a tribute to Andrew on Simple Talk and has many more fond memories of Andrew. If you ever get the chance to meet Tony, ask him for a few.

Over the years, I’ve had the chance to get to know Andrew better. He, Tony, and I would often go out for lunch when I was in Cambridge. He came to PASS a few times, and he and I had many discussions about technology and ranch life over the years. Andrew lived on a plot of land similar to mine. We both tended to build, fix, and repair things ourselves, and we often discussed our latest projects.

He also had a love of bluegrass music and wanted to come to Colorado for the Telluride festival. I’m not sure that he ever made it, though I somewhat regret not being more enthusiastic in encouraging him and offering to go with him. That isn’t my style of music, but does it matter?

As I get older, I appreciate the time I get to chat with friends and family. I cherish the opportunities to spend time with others, however long or short. These are the important things in life: the events and conversations. It’s a sad time as Andrew and a few others I’ve known have passed away in a short period of time, but I hold many happy thoughts of the times we’ve spent together.

I hope you remember to appreciate the opportunities you have to spend time with others. And in memory of Andrew, flip through his articles and pick one to read today. There are lots of great ones, and some fun ones, like the SQL Limerick.

Steve Jones

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

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

Posted in Editorial | Tagged | Comments Off on Remembering Phil Factor

The Book of Redgate: We Value Teams

This value is something that I still hear today: our best work is done in teams. On the facing page, there is a short description of what this means.

2025-08_0103

I do think that teams are very helpful, especially when building software. Our products aren’t simple inside, and they have a lot of pieces and parts assembled to try and keep tasks simple for you.

Working in teams is good, and remembering that the hierarchy matters is good. This has helped us in the past, though I find myself reminding people that the company matters more than the team. At times, teams seem to think they shouldn’t be disturbed or altered. I’ve also see people resistant to working as individuals at times. The team is important, but we can work separately to get things done.

I find many companies not stressing teams, and individuals not wanting to work with others. I get that sometimes it can be comfortable to work on our own, at our pace, the way we want, but I also know that teams allow us to get more done than we would individually.

I have a copy of the Book of Redgate from 2010. This was a book we produced internally about the company after 10 years in existence. At that time, I’d been there for about 3 years, and it was interesting to learn a some things about the company. This series of posts looks back at the Book of Redgate 15 years later.

Posted in Blog | Tagged , , | 2 Comments

Pushing the Limits of AGs

Many of you reading this likely have an Availability Group (AG) set up on at least one database in your organization. Maybe not most, but many of you as this has proven to be a technology that many people like for HA/DR, upgrades, and probably other uses. As the technology has evolved from it’s SQL Server 2012 debut, it has improved in many ways. This might be one of the few features that has received regular attention from the developers in Redmond across multiple versions.

That’s not to imply this is a foolproof or bug-free feature. Numerous people have had issues with the various types of AGs. From setup to performance to scale, I’ve seen many people post questions and search for answers on how to get their system running smoothly and reduce any late-night calls.

Over the last decade I’ve seen various people test different parts of the AG technology, but not many pieces about how much you can stress the technology at high levels. Microsoft supports up to 8 replicas, but what about groups and databases? The recommendation page says MS has tested 10 AGs and 100 databases, but nothing else.

I ran across a post on LinkedIn from Calin Oprea that covers his AG testing. He hasn’t written about it, but says he can make the scripts available. He tested 50,000 databases, maybe more. He says 50k+ in the post and notes anything beyond 500 databases per instances starts to fall apart and 1000 seems to be a hard limit. Failover doesn’t work, even without a workload.

That’s quite a test of the technology at it’s extreme. I’ve never run more than a few AGs or databases, and I see people posting and talking about dozens. Most of the people I know doing things at scale are using less than 10 AGs and usually no more than 100 databases max.

I wonder how many of you out there use more than 2 AGs on any instance and more than 20 databases. I’m sure there are lots of systems at this scale or larger, but I’d guess the majority are 1 AG and less than 10 databases.

Take a look around your environment today and see what the average and extremes are for Availability Groups. And if you’ve never looked at them, it’s a piece of technology you ought to become familiar with. HA/DR is becoming a base requirement in many situations and it’s available in the cloud with the toggle of a setting. If you work on premises, it’s likely your clients expect your systems to easily failover to another location. Check out Stairway to Always On to get started.

Steve Jones

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

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

Posted in Editorial | Tagged , | 1 Comment

A Prompt AI Experiment

Prompt AI released recently and I decided to try a few things with the tool that might help me in database work. I’ve had to do this task, but I had a customer recently ask me about this as well. They were wondering where they were short FKs.

This post showed what I tried with Prompt AI.

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

 

Help Me Query the Database

In a recent post, I looked at the MSSQL agent in VS Code to query my database. I decided to try a few things with Prompt AI, working inline. First, I connected to the database and then I asked a question of the AI: who hit the most home runs.

2025-09_0342

From the time I shot the video, I had updated Prompt, and possibly the AI got smarter, because this was the result: I had a qood query.

2025-09_0343

I wanted more, so I asked for seasons. You can see the prompt at the bottom, but seasons were added.

2025-09_0344

Click Accept and then run it and I get the correct answer.

2025-09_0345

How nice would this be for some of the BI analysts to use this to get work done?

Getting Help Fixing the Database

In this db, there aren’t any FKs. I decided to (poorly) ask about this.

2025-09_0347

Note the misspelling. One of the amazing things is the AI recognizes little errors, just as a human would, and corrects them. I get an OK result, but not great.

2025-09_0349

I rewrite my prompt to ask which ones “should” have FKs. I get this:

2025-09_0350

Helpful, but I don’t want to work through this list.

2025-09_0351

I get this. No code, and I feel like I’m talking to a junior dev who is either trying to avoid work or doesn’t have the understanding that I want work done. I’ll try again.

2025-09_0354

I get something I can use. I wouldn’t likely create all these at once, I’d test things, I might start to add these as migration scripts I can deploy over time, after I’ve verified this isn’t going to break an app or cause issues. Or there aren’t already data issues.

2025-09_0355

Still, this is one  of those nice time savings for me writing a script to try and create these or working through time one by one. Now I can just set up tests.

Or ask Prompt AI to help Winking smile

Summary

The new features in Prompt AI let you keep coding inline, but add some AI help to what you do. I’ve seen some neat things, and some frustrating ones, but overall, it’s helpful to produce code.

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

This isn’t exactly what is above, because LLMs aren’t deterministic.

 

Posted in Blog | Tagged , , , , | Comments Off on A Prompt AI Experiment