nav2009-sql-performance — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited nav2009-sql-performance (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Targets SQL Server instances hosting Dynamics NAV 2009 databases. The bundled script scripts/Invoke-SqlPerfTriage.ps1 collects a read-only diagnostic snapshot and emits JSON; the agent (you) writes the analysis. The script never modifies server or database state and never calls an LLM.SCRIPT = this skill's scripts/Invoke-SqlPerfTriage.ps1. Requires PowerShell 7+ (pwsh) and network access to the SQL Server. The full SQL-finding → NAV-action interpretation guide is in REFERENCE.md — read it before writing your analysis.
pwsh). Pass -SqlCredential for SQL auth —it is a PSCredential, so let PowerShell prompt (-SqlCredential (Get-Credential)); never put a password on the command line.
db_owner) in the NAVdatabase. The trace-flag sub-check may need sysadmin and degrades gracefully if denied.
-Encryptif the instance supports it.
Always run with pwsh. Parse the JSON it prints on stdout.
| Want | Pass |
|---|---|
| Full snapshot of a NAV DB | -ServerInstance SQLSRV01 -Database 'NAV_PROD' |
| Named instance | -ServerInstance 'SQLSRV01\NAV' |
| Server-level only (no DB) | omit -Database (DB-scoped sections report skipped) |
| Only some sections | -Sections waits,blocking,deadlocks |
| SQL auth | -SqlCredential (Get-Credential) |
| Bigger/smaller lists | -TopN 20 (default) |
| Slow big DB | -QueryTimeout 300 (fragmentation scan is the slow one; or drop it from -Sections) |
| Save full report | -OutFile C:\path\triage.json |
Sections: server, database, waits, top_queries, missing_indexes, unused_indexes, blocking, deadlocks, sift, fragmentation, stats, largest_tables (default all).
Examples:
# Full triage of a NAV 2009 database
pwsh -File SCRIPT -ServerInstance SQLSRV01 -Database 'Navision_PROD' -OutFile C:\ops\nav-triage.json
# "Users are stuck right now" — live locking picture only
pwsh -File SCRIPT -ServerInstance SQLSRV01 -Database 'Navision_PROD' -Sections blocking,deadlocks,waitson stdout. Prefer -OutFile for full snapshots so your context stays small; then read only the sections you need from the file.
Top level: status (ok / partial / error), generated_at (UTC), and sections, where each section is { status: ok|error|skipped, data|error|reason }. Timestamps inside data are SQL Server local time; deadlock timestamps are UTC. Full schema and per-section notes in REFERENCE.md.
REFERENCE.md. The key NAV 2009 specifics:
FETCH API_CURSOR / sp_cursorfetch are normal for the Classic clientdriver — judge them by reads-per-execution, not by their cursor shape.
SETCURRENTKEY matching thefilters, FIND('-') loops over large tables, or CALCSUMS/FlowFields without a supporting SIFT key. The fix belongs in C/AL or NAV key design more often than in raw SQL indexes.
option — NAV owns its indexes via table keys (MaintainSQLIndex) and SIFT views (MaintainSIFTIndex); out-of-band SQL indexes are lost when keys/companies change. Say so.
G/L Entry, Item Ledger Entry,dimension tables, No. Series Line) — typical fixes are C/AL-side (lock ordering, shorter transactions, MaintainSIFTIndex off on hot SIFT views), not SQL-side.
NAV-level cause → concrete next action. Don't recite every section.
status: error/skipped and what that means forthe analysis (e.g. "deadlocks section unavailable — SQL 2005 has no Extended Events"). Wait stats and index usage are cumulative since instance restart — state the window (server.system.sqlserver_start_time) before drawing conclusions from them.
nav2009-development skill holds the coding patterns.
Cannot connect → wrong instance name, SQL Browser off for named instances, firewall, or auth.Suggest checking with Test-NetConnection <server> -Port 1433.
error: VIEW SERVER STATE permission was denied → ask for the permission grant; theremaining sections still ran.
deadlocks empty/unsupported on SQL Server 2005 → only SQL Profiler / trace flag 1222 can capturedeadlocks there; offer that as the manual alternative.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.