Skip to content

Docs: README example fixes, folder index, Azure note for sp_IndexCleanup, installers - #956

Merged
erikdarlingdata merged 1 commit into
devfrom
fix/admin-readmes
Nov 13, 2026
Merged

erikdarlingdata merged 1 commit into
devfrom
fix/admin-readmes

Conversation

@erikdarlingdata

@erikdarlingdata erikdarlingdata commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Docs and text-only fixes from an admin audit of the repo. No procedure logic changes and no version or @version_date changes. Install-All/DarlingData.sql is untouched.

1. sp_HumanEvents README: BlockViewer example named the wrong default

What went wrong. The Setup section creates a session called blocked_process_report. The usage example below it said "default session name", but sp_HumanEventsBlockViewer defaults @session_name to keeper_HumanEvents_blocking. A reader who ran Setup and then the "basic" example got no data.
Fix. The first example now names the real default and says when it exists (sp_HumanEvents with @event_type = 'blocking' and @keep_alive = 1 creates it). The second example is labeled as the way to read the Setup session.
Re-check. Default confirmed at sp_HumanEventsBlockViewer.sql:65; the keeper name is built at sp_HumanEvents.sql:758-766.

2. sp_QuickieCache README and root README: "plans created today"

What went wrong. The example passed a fixed @start_date = '20260403' but was labeled "Only plans created today".
Fix. Relabeled in both files to "Only plans created or cached on or after a date", which matches the parameter row.

3. sp_IndexCleanup: Azure SQL Database note for @get_all_databases

What went wrong. The procedure raises error 16 for @get_all_databases = 1 on Azure SQL Database (sp_IndexCleanup.sql:1465-1471: "@get_all_databases is not supported on Azure SQL Database. Please specify a @database_name instead."). No doc or @help said so.
Fix. Added to the sp_IndexCleanup/README.md parameter row and notes list, the root README parameter row, and the @help description text. The @help edit is a string literal only.
Proof. Ran the sp_IndexCleanup harness once on SQL2025 with the edited proc installed in master: Results: 58 passed, 0 failed, 58 total. Then reinstalled the origin/dev copy into master (confirmed by checking the new help text is gone). Note: run_tests.py prints Results: rather than Total:, so the first grep pass matched nothing and I ran it a second time to read the result. The harness leaves six test_ic_idk_* tables in StackOverflow2013; I dropped them.

4. Root README folder index missing six folders

What went wrong. Alerts, Create Long IN List, Dynamic SQL Logging, Inline Financial Functions, SQL Debug Example and Stack Column Store Database had no entry. None of them has a README, so they did not fit under "Utility scripts" ("These folders each have their own README").
Fix. New "Other scripts" section with one line each, written from reading each folder's files. Stack Column Store Database is described plainly as a personal demo build script with hard-coded file paths (D:\SQL2017\StackCS\...) that is not meant to run as is.

5. LICENSE.md year

Copyright (c) 2021 is now Copyright (c) 2019-2026. Nothing else changed.

6. Installers: documented

sp_HumanEvents/install-human-events.sql and sp_PressureDetector/install-pressure-detector.sql are sqlcmd-mode installers that no README mentioned.
Checked first. Ran each from its own folder on SQL2025 into scratch database zz_fix_g_1 with sqlcmd -S SQL2025 -U sa -C -i <installer> -v TargetDB="zz_fix_g_1". Both reported success and the database held sp_HumanEvents, sp_HumanEventsBlockViewer and sp_PressureDetector. Dropped the database afterward.
One defect found and fixed. Both files tell the user to pass -v TargetDB = "name" (spaces around the equals sign) in the header comment and in the "must specify the target database" message. go-sqlcmd rejects that form (TargetDB must be formatted as key=value). The messages now show -v TargetDB="name", which I ran with go-sqlcmd and which legacy sqlcmd also accepts. The "-V" in the message is now "-v", and the placeholder is now <database_name> instead of {server-name}. Text only, three lines per file. Re-ran both installers after the edit, plus the empty-TargetDB path (prints the corrected usage and aborts).
Docs. Added an "Install with sqlcmd" section with the command line to sp_HumanEvents/README.md (also in its table of contents) and sp_PressureDetector/README.md.
If Erik would rather delete the installers, drop section 6 and the two .sql files from this PR; nothing else depends on them.

Plain-English checker

Ran check.py on README.md, sp_HumanEvents/README.md, sp_IndexCleanup/README.md, sp_QuickieCache/README.md and sp_PressureDetector/README.md. No hits on any line I changed or added. Existing hits elsewhere in those files are left alone.

Dropped

Nothing. All six findings still held at origin/dev b7fba0f.

Considered, not added

  • Other sqlcmd installers: only these two exist in the repo.
  • A README for each of the six "Other scripts" folders: out of scope for an index fix.
  • Re-running the full set of proc harnesses: no procedure logic changed.

CI at the time of writing: "Detect SQL changes" pending. Not waited on.

🤖 Generated with Claude Code

https://claude.ai/code/session_01M98owc3zzZNEpij3p49Bbe

…nup, installers

- sp_HumanEvents README: the BlockViewer examples now name the real default session (keeper_HumanEvents_blocking) and point the custom-name example at the Setup session.
- sp_QuickieCache README and root README: relabel the @start_date example, which is not "today".
- sp_IndexCleanup: README, root README and @help now say @get_all_databases is not supported on Azure SQL Database (text-only, no version change).
- Root README: add an "Other scripts" index for six folders that had no entry.
- LICENSE.md: copyright years 2019-2026.
- sp_HumanEvents and sp_PressureDetector: document the sqlcmd installers; fix their usage text to the -v TargetDB="name" form that both sqlcmd flavors accept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M98owc3zzZNEpij3p49Bbe
@erikdarlingdata
erikdarlingdata marked this pull request as ready for review November 13, 2026 08:40
@claude

claude Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Claude finished @erikdarlingdata's task in 12s —— View job


Review of PR #956

The changes look good. I found nothing blocking.

  • Scope: Only docs, a @help string literal, and installer message text changed. There are no @version or @version_date changes, and Install-All/DarlingData.sql is untouched.
  • sp_IndexCleanup @help edit: It is a string literal change inside the existing CASE, so there are no logic or compatibility concerns.
  • Installers: The -v TargetDB="name" form is correct. The -V to -v fix and the {server-name} to <database_name> placeholder fix are both right. The messages are plain RAISERROR strings, so they don't affect T-SQL style rules.
  • Docs: The sp_HumanEvents BlockViewer example now names the real default session. The sp_QuickieCache relabel and the new "Install with sqlcmd" sections match the installer behavior.

I only read the diff. I did not re-run the installers or the harness, so I'm relying on the results reported in the PR description.

One small, optional point: the README sqlcmd examples use {sql-server} placeholders while the installer messages use <servername>. The mismatch is harmless.

@erikdarlingdata
erikdarlingdata merged commit efedd3d into dev Nov 13, 2026
8 checks passed
@erikdarlingdata
erikdarlingdata deleted the fix/admin-readmes branch November 13, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant