10/29/2026
by Marlon Ribunal
0 comments

SQL Server Problems You Can Reproduce, Measure and Fix: A Free Demo Library

A note on how this was made: I built these demos and explainers with the help of AI. Every script runs against real SQL Server instances, checks its own predictions, and is re-run by continuous integration on SQL Server 2019, 2022 and 2025, so the numbers here come from those runs.

Most SQL Server advice arrives as a rule: don’t use NOLOCK, rebuild indexes over 30% fragmentation, make every string nvarchar(max) because storage is the same anyway. Some of those rules are right, some are half right, and a few are wrong in ways that only show up under load.

I wanted to stop repeating rules and start showing evidence. So I built SQL Server Demos: a free, open-source library of runnable demos. Each one reproduces a real production problem on purpose, measures every common fix, and checks its own predictions. Every topic also has a short explainer here on the blog, in the SQL Server Demos library.

What’s in the library

The demos are organised around the symptom you’re seeing, not the feature name, because that’s how problems arrive in production:

The full list is on the library page.

A few things the demos measured

The point of running the demos rather than reading about them is that the numbers sometimes disagree with the folklore:

  • NOLOCK read a balance that never existed. The writer rolled back, and the reader had already returned the uncommitted value. RCSI returned the last committed value with no wait at all. (RCSI and snapshot isolation)
  • A 99.97% fragmented index did exactly the same reads as a clean one, to the page. Half-empty pages, at 0.12% fragmentation, doubled the reads. (index fragmentation)
  • varchar(4000) holding 17-character names was granted 1.4 GB of memory for a sort that used 24 MB. varchar(50) was granted 68 MB. (memory grants)
  • Page 1,000 with OFFSET ... FETCH took 159,530 reads. Keyset paging took 217, on every page. (pagination)
  • IF EXISTS ... INSERT produced 598 primary key violations in 800 upserts under concurrency. UPDLOCK, SERIALIZABLE produced none. (upsert race conditions)
  • On SQL Server 2025, the classic catch-all search dropped from 3,001,752 reads to 16,286 at compatibility level 170, but two optional parameters can still reuse a bad plan. (optional parameter plans)

How the demos are built

Every topic follows the same shape, so once you’ve run one you can run them all:

  1. 01-setup.sql builds the data, usually in a database of its own.
  2. 02-demo.sql runs the whole demonstration unattended and captures its own evidence.
  3. 03-cleanup.sql puts back anything setup changed and drops everything.

Each demo ends with a result set listing anything that didn’t behave as predicted. Continuous integration runs every topic on SQL Server 2019, 2022 and 2025 on every push, so a passing run means the behaviour described really happened on that version, not just that the script finished.

They’re also written to be safe on a shared instance. Nothing flushes the whole plan cache or clears instance-wide wait stats, and setup records every setting it changes so cleanup can restore it. They’re still demos, though: run them on a scratch instance. A docker-compose.yml in the repo starts SQL Server 2019, 2022 and 2025 side by side.

Each explainer is a one-page answer

The explainers are short reference pages, not essays. Each one covers:

  • What you’ll see: the symptom, in the words you’d search for
  • Why it happens
  • What to do, and what doesn’t help
  • Check your server: a read-only query to run on your own instance
  • Run it yourself: a link to the demo on GitHub

Every page also has a short link, such as marlonribunal.com/go/parameter-sniffing, to paste into a ticket or a chat.

Try it

If the library helps you, a star on GitHub or a share with your team helps other people find it.

Frequently asked questions

Are the SQL Server demos free?

Yes. The scripts are MIT-licensed on GitHub, and the explainers are free to read.

Which SQL Server versions do the demos support?

Continuous integration runs every demo on SQL Server 2019, 2022 and 2025. Demos for newer features report SKIPPED on older versions instead of failing. Azure SQL Database and Managed Instance haven’t been tested.

Can I run the demos on a production server?

No. Several demos change database settings by design. Run them on a scratch instance; the repo’s docker-compose.yml starts one in a minute.

Do I need a sample database?

Only the parameter sniffing demo needs WideWorldImporters. The others create their own data.

10/23/2026
by Marlon Ribunal
0 comments

Book Review: Microsoft 365 Copilot and Agent Administration Fundamentals

I don’t currently manage Microsoft 365 Copilot in an enterprise environment, but it is one of those technologies that I want to understand better. As AI becomes part of the tools organizations use every day, there is more to learn than just how to use Copilot.

Someone has to manage access, understand licensing, protect company data, and make sure these tools are being used appropriately. And if I ever find myself responsible for that side of things, I want to have a good foundation to start with.

That is where Steve Miles’ Microsoft 365 Copilot and Agent Administration Fundamentals, published by Packt, comes in.

The book covers quite a bit of ground, starting with the fundamentals of Microsoft 365 administration before moving into security, data protection, Copilot, and AI agents. It also prepares readers for the Microsoft AB-900 certification exam.

Understanding What Happens Behind the Scenes

One thing I appreciate about the book is that it starts with the basics. Before getting into Copilot administration, you need to understand the Microsoft 365 environment in which it operates. This includes identity, licensing, permissions, and the different services that make up Microsoft 365.

Some of these topics may already be familiar to IT professionals who work with Microsoft 365 regularly. For others, particularly those coming from a different area of IT, having these concepts explained in one place can be useful.

The security and data protection chapters are especially relevant. Copilot works with organizational data, so understanding how permissions affect what users can access is important. The discussions around Microsoft Purview, data governance, and oversharing in SharePoint help explain why deploying AI tools in an organization requires more thought than simply enabling a feature and giving users access.

This is probably one of the areas I find most interesting. We often talk about what AI can do, but there is another side to the conversation. What information can it access? Are existing permissions appropriate? What happens when sensitive information is exposed to people who should not have access to it? These are questions administrators need to consider before rolling out these tools.

Copilot and Agents Administration

The later chapters get into the administration of Copilot and agents, including licensing, usage monitoring, billing, access control, approval processes, and lifecycle management.

I like that the book covers these operational considerations alongside the features themselves. Understanding what Copilot and agents can do is one thing. Knowing how to manage them within an organization is another.

The sections on creating, testing, approving, and monitoring agents are particularly useful for anyone looking to understand how these tools fit into an organization’s existing environment. There is also value in learning how licensing and access restrictions affect what users can actually do.

Of course, reading about these administrative tasks is different from performing them in a live tenant. I would still want to get hands-on experience with the relevant admin centers and settings to reinforce what I have learned. But having the concepts laid out first gives me a much better starting point.

A Useful Learning Resource

Another thing I appreciate about technical books is having the material organized into chapters that I can revisit when needed. Online documentation is valuable, especially when looking for current configuration details, but sometimes I want a structured path through a subject before diving into individual features.

The book includes chapter summaries, key terms, Microsoft Learn references, and review questions. These are useful for reinforcing the material and preparing for the AB-900 exam. The exam-oriented approach also gives readers a way to check their understanding as they progress.

One limitation worth mentioning is that this is a fundamentals book. Readers looking for extensive, real-world deployment walkthroughs or advanced troubleshooting scenarios may need to supplement it with hands-on practice and Microsoft’s documentation. Given the breadth of topics covered, there is only so much detail that can fit into a single book.

Still, I think that is a reasonable trade-off for a resource intended to establish a foundation across Microsoft 365, security, Copilot, and agents.

Final Thoughts

Microsoft 365 Copilot and Agent Administration Fundamentals by Steve Miles is a useful addition to the technical bookshelf, especially for IT professionals who want to expand their knowledge beyond the technologies they currently manage.

I may not be administering Copilot in an enterprise environment today, but I can see the value of understanding what goes into managing it properly. If that responsibility comes my way in the future, I will have a starting point and a better idea of what I need to learn next.

And even if you are already working with Microsoft 365, the book offers a structured way to review the fundamentals and connect them to the administration of Copilot and AI agents.

That alone makes it a worthwhile read for anyone looking to get a better grasp of this part of the Microsoft ecosystem.

US DoD STIG For SQL Server

09/22/2026
by Marlon Ribunal
1 Comment

Creating a Custom SQL Server Security Checklist Using the DoD STIG

Here’s a follow up for our US Department of Defense STIG document. In my previous post, SQL Server Security Hardening Guide Using the DoD STIG Checklist, I walked through how I used the DoD STIG checklist as a starting point for reviewing and hardening a SQL Server environment.

After going through the checklist, I started thinking about what I would actually want to use the next time I perform a security review.

The DoD STIG for SQL Server is a great, solid starting point for establishing your security practices with SQL Server. In fact, it’s also a good template for your own STIG in your organization. So, you may want to create a custom checklist that makes sense from the perspective of your SQL Server environment.

The STIG is detailed, which is a good thing, but I found myself wanting something a little more practical for day-to-day DBA work. Something I could open, work through one item at a time, record what I found, and come back to later without having to navigate through the entire STIG document every time.

Questions to Ask

I want it to answer some simple questions:

  • What am I checking?
  • Why am I checking it?
  • How can I verify it?
  • What does PASS or FAIL look like?
  • What evidence should I record?
  • Does this requirement actually apply to this environment?
  • If I can’t meet a requirement, how do I document the exception?

So in this post, I’ll walk through how I’m building the checklist, based on the DoD STIG as the baseline (and I can then organize it into something I can actually use as a DBA).

The main thing here is to understand what the STIG is asking you to verify.

Once I have the STIG requirements in front of me, the next step is to break each rule down into information that I can actually work with. Rather than simply copying the requirement into my checklist, I want to capture a few key details for each rule.

This gives me enough information to understand what I’m checking, how I can validate it, and what I should record when I’m done.

Again, this STIG is just a starting point. Capture the checklist in a separate document that you can share in your organization.

What to Capture?

For every rule, capture:

  • STIG ID
  • Severity
  • Requirement
  • Check
  • Fix
  • Instance or Database
  • Applicable?
  • Current status

Let’s Create a Checklist

Let’s open the STIG Viewer, at the Checklist section, click New to create a new checklist.

Let’s select to create a checklist for a SQL Server Instance.

You have to options: Add individual rules or add all the rules in the STIG. Click the search icon to pick the individual rules or the plus sign to add all the rules. For the purpose of this blog post, let’s add few rules.

Select the rule by clicking the Plus sign. Select all that you want added in your checklist.

To save the checklist, navigate to the burger menu in the top left-hand corner and select Save. Give the checklist file an intuitive name.

Once saved, you can close the checklist builder. The STIG Checklist options will then give you a couple of options to load or create another checklist. Let’s open the checklist that we just created.

Review the checklist and check it against a specific instance or database that you want to assess. Here you can note the instance/database information and mark each rule with three statuses:

Green Check Icon: Not a Finding (meaning instance/database pass the rule),

Red Exclamation: Open (for further review), or

Crossed Circle: Not Applicable

Default Grey Circle: Not reviewed

Keep clicking the gray button to cycle through the statuses.

You can also leave a comment and findings details in each of the rules in the designated boxes at the bottom.

You can then export the checklist if you want to keep a separate file for the assessment (html and then print it to a pdf file).

Here’s some screenshots of the the example html…

Your Checklist as Your Tool

Instead of reproducing the STIG’s structure, I’d create something a DBA can work through. I’d create a checklist for the following categories:

CategoryWhat you’re checking
AuthenticationHow users authenticate
AuthorizationWho has access to what
Accounts & LoginsSQL logins, Windows accounts, disabled accounts
Privilegessysadmin, server roles, database roles
AuditingLogin and security-related auditing
EncryptionTDE, TLS, encryption at rest
Network SecuritySQL ports, protocols, exposure
ConfigurationSQL Server security-related configuration
Database SecurityDatabase-level permissions and ownership
Service AccountsSQL Server service identities
Agent SecuritySQL Agent jobs, proxies, credentials
Sensitive DataPII and other protected information
MonitoringSecurity events and changes
DocumentationExceptions, evidence and remediation

That and among other things that may be applicable to whichever environment I happen to be working on.

This is where your checklist becomes your own tool, rather than just another copy of the STIG.

Most Important Thing, Document

This is an important part of the checklist. I don’t want the process to be simply about finding a problem and immediately changing the configuration. Involve everyone and, needless to say, document.

The goal is to first understand the current state, evaluate whether the setting actually needs to be changed, make the appropriate remediation if necessary, and then validate the change. This gives me a more deliberate process instead of treating every finding as something that automatically requires a configuration change.

This process would look as simple as the following:

1. Check – Determine the current state.

2. Evaluate – Decide whether the configuration is appropriate for your environment.

3. Remediate – Make the change if necessary.

4. Validate – Run the check again.

5. Document – Record what changed.

That gives you a repeatable process:

       CHECK
         ↓
      EVALUATE
         ↓
     REMEDIATE
         ↓
      VALIDATE
         ↓
     DOCUMENT

And I’d emphasize that STIG compliance doesn’t automatically mean every setting should simply be changed without considering the environment.

If this was a real checklist for a SQL Server environment I am responsible for, this is my starting point. I expect the checklist to change as I use it, find gaps, and learn more about what works in an actual SQL Server environment.

The STIG gives me a solid baseline, but turning those requirements into something I can consistently use as a DBA makes the exercise much more useful for me.

My next step is to take these checks and start turning them into T-SQL scripts where possible, so instead of manually checking everything, I can let SQL Server help me identify what needs attention.

Have fun and enjoy securing your SQL Server!

Verified by MonsterInsights