sqmSQLTool · Inventory & Documentation · 2026

Inventory & Docs

Transparency at the push of a button.

Who runs what, on which server, at which patch level, with which databases - answered in seconds instead of hours.

HTML reports CSV export Patch compliance Multi-instance Central archive

Uwe Janke · Senior SQL Server DBA · dtcSoftware

📋 InstanceInventory — SQL01\PROD — 2026-05-20
Instance
VersionSQL Server 2022 (16.0.4175.1)
EditionDeveloper Edition (64-bit)
Patch levelCU17 - current
Max Memory32,768 MB
Databases (5)
FinanceFULL • 42.5 GB • backup: today 20:14
ControllingFULL • 8.1 GB • backup: today 20:14
StagingDBSIMPLE • 1.2 GB • no backup
AlwaysOn AG: AG_Prod
SQL01 (Primary)SYNCHRONIZED
SQL02 (Secondary)SYNCHRONIZED

Motivation

What missing documentation costs

💥

Staff turnover = lost knowledge

Which databases live on SQL03? Who owns "OldArchive"? Is the recovery model set correctly? Without documentation, the search starts from zero.

🕵️

Audit: manual research

Patch level of every instance? Privileged accounts? Certificate expiry dates? Without a tool, every audit question means hours of manual work across dozens of servers.

Incident: no baseline

"Was it like this yesterday?" Without regular snapshots, there's no way to tell if a configuration deviation is old or new. Root-cause analysis takes hours instead of minutes.

📉

Growing disk use, unnoticed

Databases grow quietly. The first sign is when space runs out - by then it's too late. Forecast data simply doesn't exist.

✓ sqmSQLTool delivers all of this automatically, on a schedule, and filed centrally - no manual queries against every server one by one.

Overview

Four categories. One module.

📋

Inventory

A full snapshot of an instance: version, databases, logins, AG, jobs, configuration.

📑

Database docs

Per database: files, sizes, autogrowth, backup times, objects, users - as an HTML report.

🛡️

Patch compliance

Compares the installed build against current CUs. Traffic-light status per instance and version.

📊

Operational reports

Disk forecasting, AG health, certificate expiry, autogrowth, SPN status - automated daily.

1
command per report
No script to assemble, no SSMS to open - straight from PowerShell.
n
instances in parallel
Pipeline-capable: every instance in one call, one consolidated report.
Central archive
CentralPath: every report lands automatically in one defined location.

Inventory

Invoke-sqmInstanceInventory

A full snapshot of a SQL Server instance - TXT (readable) + CSV (machine-readable). Filed in the central archive automatically.

What gets captured

ℹ️ Instance infoVersion, edition, patch level, collation, auth mode, MAXDOP, max/min memory, CPU count
💾 DatabasesName, status, recovery model, size (MB), last full backup, owner, creation date
🔑 LoginsName, type (Windows/SQL), active/inactive, server roles
🔗 Linked serversName, product, provider, data source
🗓️ Agent jobsName, active/inactive, owner, last run + status
⚙️ sp_configureOnly deviations from default - immediately visible what changed
🔄 AlwaysOnAG name, primary, replicas + roles, listener (port/IP), sync status

Call

# A single instance
Invoke-sqmInstanceInventory `
    -SqlInstance 'SQL01\PROD' `
    -OutputPath  'C:\Reports\SQL'

# Every instance from a list
'SQL01','SQL02','SQL03' | Invoke-sqmInstanceInventory

Output files

Call
*.txt
Readable report
+
*.csv
Excel/SIEM
Central­Path
Archive

Filename: InstanceInventory_SQL01_PROD_2026-05-20.txt

Database documentation

Export-sqmDatabaseDocumentation

A self-contained HTML report per instance - no external CSS, opens straight in a browser. Color-coded status badges.

Content per database

PropertiesStatus, recovery, collation, owner, creation date, compat level
File sizesData / log separately, including autogrowth settings and growth type
Backup ageLast FULL / DIFF / LOG with an age indicator - instantly visible if a backup is missing
CHECKDBDate of the last integrity check, with an age warning
VLF countNumber of virtual log files (SQL 2016+) - excessive values are flagged
ObjectsCount of tables, views, procs, functions, triggers, synonyms
DB usersName, login name, type - orphaned users spotted immediately

HTML report layout

📑 Database Documentation — SQL01\PROD
Table of contents
🔗 FinanceOK
🔗 ControllingOK
🔗 StagingDB⚠ SIMPLE
Finance - details
Backup FULL4h ago
CHECKDB2 days ago
VLF count312 ⚠
Data size42.5 GB

Call

Export-sqmDatabaseDocumentation `
    -SqlInstance 'SQL01' `
    -Database    'Finance*' `
    -OutputPath  'C:\Reports'

Filename: DatabaseDoc_SQL01_20260520_2015.html

Compliance

Patch level at a glance

Invoke-sqmPatchAnalysis - compares the installed build against an embedded reference table of every known CU. Traffic-light status and a concrete recommendation per instance.

InstanceVersionBuildStatusRecommendation
SQL012022 16.0.4175 CU17 - current No action needed
SQL022022 16.0.4135 CU14 - 3 behind current CU update recommended
SQL032019 15.0.2000 RTM - 29 behind current Patch immediately
SQL042019 15.0.4405 CU29 - current No action needed

Reference table embedded: SQL 2016 SP3, 2017 up to CU40, 2019 up to CU29, 2022 up to CU17.

Call - every instance

# Analyze every instance, save CSV
'SQL01','SQL02','SQL03','SQL04' |
    Invoke-sqmPatchAnalysis `
        -OutputPath 'C:\Reports\Patch'

# Show only outdated ones
'SQL01','SQL02','SQL03','SQL04' |
    Invoke-sqmPatchAnalysis |
    Where-Object { -not $_.IsLatest }

What the ops manager gets

  • A tabular patch overview of every instance
  • Traffic-light status: UpToDate / MinorUpdate / MajorUpdate / Critical
  • BuildsBehind: the exact number of missed CUs
  • Recommendation: a directly quotable recommendation
  • CSV export for a ticketing system or audit report

Configuration comparison

Compare-sqmServerConfiguration

A planned-vs-actual comparison of two instances. Before/after a migration, production vs. test, node 1 vs. node 2 in an AG pair.

# Compare production vs. test
Compare-sqmServerConfiguration `
    -SourceInstance 'SQL01\PROD' `
    -TargetInstance 'SQL02\TEST' `
    -CompareDatabases

# Result: differences only
Setting              SourceValue  TargetValue
MaxMemory            32768        8192       <-- Different
MaxDOP               4            8          <-- Different
Collation            Latin1...    Latin1...  (OK)
CostThreshold        50           25         <-- Different
ℹ Without -CompareDatabases: instance configuration only. With the switch, database-level settings too (owner, recovery model, collation).

Typical use cases

1
Before a migration

Compare the source and target server - confirm every relevant setting has been carried over.

2
AG node parity

Both nodes of an AlwaysOn pair need to be configured identically. Deviations are risks.

3
Post-change verification

After a change request, prove that only the planned values were changed.

4
Audit: configuration standard

A golden standard server vs. a production instance. Deviations exported as CSV for the auditor.

Daily operations

Reports for day-to-day operations

💾

Disk forecasting

Get-sqmDiskSpaceReport

D:\68% free
E:\18% free
F:\8% — 11 days

Shows the growth rate and "days until full" based on a 30-day history.

📈

Autogrowth analysis

Get-sqmAutoGrowthReport

Flags percentage-based growth, steps that are too small (<64 MB), and unbounded log files as warnings.

🔄

AG health report

Get-sqmAgHealthReport

FinanceSYNC • 0 MB
ReportingSYNC • 82 MB

Redo queue and send queue per database. Warning thresholds are configurable.

🚧

Blocking report

Get-sqmBlockingReport

Blocking chains with the head blocker, SQL text, wait duration, and affected resources - for immediate diagnosis.

🔐

Certificate expiry

Get-sqmCertificateReport

HADR_Cert248 days
TDE_Cert62 days
SB_CertEXPIRED

Covers: AlwaysOn / TDE / Service Broker / backup. An ALERTS.csv with critical entries only.

🆔

SPN report

Get-sqmSpnReport

Checks Kerberos SPN registration. Missing SPNs come with ready-to-run setspn.exe commands.

Central archive

Every report. One place.

CentralPath: every report function automatically copies its result to the configured target path - no extra steps.

Configure once

# Set the central archive (once)
Set-sqmConfig `
    -CentralPath '\\fileserver\SQLReports' `
    -OutputPath  'C:\Reports\Local'

# From now on: every function copies automatically
Invoke-sqmInstanceInventory -SqlInstance 'SQL01'
# Result lands in:
#  C:\Reports\Local\InstanceInventory_SQL01_...txt
#  \\fileserver\SQLReports\InstanceInventory_SQL01_...txt

What gets replicated automatically

InstanceInventory DatabaseDoc PatchAnalysis DiskSpaceReport AgHealthReport CertReport SpnReport
ℹ The directory structure on CentralPath stays flat (no subfolders). Filenames include the instance name + date - no collisions across multiple instances.

Resulting folder structure (example)

\\fileserver\SQLReports\
  InstanceInventory_SQL01_PROD_2026-05-20.txt
  InstanceInventory_SQL01_PROD_2026-05-20.csv
  InstanceInventory_SQL02_PROD_2026-05-20.txt
  InstanceInventory_SQL03_TEST_2026-05-20.txt
  DatabaseDoc_SQL01_PROD_20260520_2015.html
  DatabaseDoc_SQL01_PROD_20260520_2015.csv
  PatchAnalysis_20260520_2014.csv
  DiskSpaceReport_SQL01_PROD_2026-05-20.txt
  DiskSpaceReport_SQL01_PROD_2026-05-20.csv
  CertReport_SQL01_PROD_20260520_2013.txt
  CertReport_SQL01_PROD_20260520_2013_ALERTS.csv
  AgHealthReport_SQL01_PROD_2026-05-20.txt
✓ Team leads and ops managers have read access to the share - every report is up to date without a DBA lifting a finger.

Scale

Every instance. One call.

Every report function is pipeline-capable. An instance list from a file, database, or AD - sqmSQLTool processes them all in parallel.

# Instance list from a text file
Get-Content 'C:\Config\instances.txt' |
    Invoke-sqmInstanceInventory

# Patch analysis of every production instance
Get-Content 'C:\Config\prod_instances.txt' |
    Invoke-sqmPatchAnalysis `
        -OutputPath '\\fileserver\SQLReports\Patch'

# Only outdated ones, as a table - for a ticket
Get-Content 'C:\Config\prod_instances.txt' |
    Invoke-sqmPatchAnalysis |
    Where-Object { -not $_.IsLatest } |
    Select-Object SqlInstance,PatchStatus,BuildsBehind,Recommendation |
    Format-Table -AutoSize
-ContinueOnError: an unreachable instance doesn't interrupt the entire run.

Recommended scheduler cadence

JobCadenceCommand
InventoryWeeklyInvoke-sqmInstanceInventory
DB docsWeeklyExport-sqmDatabaseDocumentation
Patch analysisWeeklyInvoke-sqmPatchAnalysis
Disk forecastDailyGet-sqmDiskSpaceReport
AG healthDailyGet-sqmAgHealthReport
CertificatesDailyGet-sqmCertificateReport

The simplest setup

Every job can be set up as a SQL Agent job or a Windows Task Scheduler task - configure once, they run fully automatically and save to CentralPath.

Reference

Quick reference

TaskFunctionOutput
Instance snapshotInvoke-sqmInstanceInventoryTXT + CSV
DB documentationExport-sqmDatabaseDocumentationHTML + CSV
Patch complianceInvoke-sqmPatchAnalysisConsole + CSV
Config comparisonCompare-sqmServerConfigurationConsole
Disk forecastGet-sqmDiskSpaceReportTXT + CSV
AG healthGet-sqmAgHealthReportTXT + CSV
Certificate expiryGet-sqmCertificateReportTXT + CSV + ALERTS.csv
Autogrowth checkGet-sqmAutoGrowthReportConsole
Blocking analysisGet-sqmBlockingReportConsole + CSV
SPN auditGet-sqmSpnReportTXT + CSV
Hardware reportGet-sqmServerHardwareReportHTML + CSV + TXT
Central archiveSet-sqmConfig -CentralPathautomatic

Key parameters

-OutputPathTarget directory for report files
-ContinueOnErrorSkip errors per instance
-CompareDatabasesCompare at the database level too
-WarnThresholdPctDisk-space warning threshold (default: 20%)
-CriticalThresholdPctCritical threshold (default: 10%)
-WarningThresholdDaysCertificate warning (default: 90 days)
-HistoryDaysTime span for disk growth forecasting

Switching language

# Reports in English
Set-sqmConfig -Language 'en-US'
# Back to German
Set-sqmConfig -Language 'de-DE'
sqmSQLTool - Core module AlwaysOnSetup - AG setup SQLSetupTool - Base install SQLMigration - Database migration DeadlockCollector - Deadlock GUI

Hardware configuration

Get-sqmServerHardwareReport

A detailed hardware report via CIM/WMI — no PowerShell remoting required.

🖥

What gets captured

💻 Operating systemVersion, build, uptime, domain
⚙ ProcessorModel, socket, cores, clock speed
💾 MemoryTotal, free, DIMM details (type, speed)
💿 DrivesPhysical (SSD/HDD) + logical with utilization bars
🌐 NetworkIP, MAC, DNS, gateway
🗄 SQL ServerInstances, status, startup type (no SQL login needed)
☁ VM detectionHyper-V, VMware, VirtualBox, KVM/QEMU, physical

Output formats: -OutputFormat

HTML (dark theme) CSV (Excel import) TXT (readable) All (all 3)

Examples

# Local server, open HTML in the browser
Get-sqmServerHardwareReport

# Remote server, CSV for Excel
Get-sqmServerHardwareReport `
    -ComputerName "SQL01" `
    -OutputFormat CSV -NoOpen

# Multiple servers, every format
Get-sqmServerHardwareReport `
    -ComputerName "SQL01","SQL02","SQL03" `
    -OutputFormat All -NoOpen

# Pipeline from an AD OU
Get-ADComputer -SearchBase "OU=DB,DC=corp,DC=local" `
    -Filter '*' |
    Select-Object -ExpandProperty Name |
    Get-sqmServerHardwareReport `
        -OutputFormat All -NoOpen

HTML report — preview

🖥 Hardware Report — SQL01 — Hyper-V
System
OSWindows Server 2022 Datacenter
RAM64 GB • 12% used
CPUIntel Xeon E5-2690 • 8 / 16 cores
Drives
C:\120 GB • 34% used
D:\2.0 TB • 41% used
L:\500 GB • 78% used
SQL Server
MSSQLSERVERRunning • Automatic

Summary

What your team gains

📋 For the ops manager

Patch compliance at the push of a button

Always available: which instances are out of date, how urgent is the action needed?

No surprises from disk shortages

The forecast gives 10+ days of lead time - enough for capacity planning without middle-of-the-night emergencies.

Audit reports without DBA effort

Certificates, logins, configuration - all current on the share. The auditor helps themselves.

📊 For the team lead

Faster onboarding

New colleagues get the current inventory report - no weeks of getting up to speed.

Automated change verification

Compare-sqmServerConfiguration proves after every change that only the planned values changed.

Migrations prepared safely

A planned-vs-actual comparison before every migration - no more forgotten settings on the target system.

12
report functions
Inventory, docs, patches, hardware, operations
0
manual steps after setup
CentralPath + scheduler = fully automatic
n
instances in parallel
Pipeline - scales to the entire estate