neuron-explorer
Steering-first neuron explorer for Qwen3.5-4B: push every MLP neuron, keep every rollout, browse the results
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Production-ready T-SQL scripts and tools for SQL Server DBAs. Focused on HA/DR (Availability Groups), performance diagnostics, monitoring, and incident response.
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
SQL Server Health, Reviewed by AI — Collection, Dashboard, and Copy/Paste Scripts for Production DBAs
I'm Peter Whyte — production SQL Server DBA, running sqldba.blog. This is the toolkit I actually use, and it's built around one idea: collect everything a DBA looks at on a server, then have an AI review it with you.檢視完整 README ↗I'm Peter Whyte — production SQL Server DBA, running sqldba.blog. This is the toolkit I actually use, and it's built around one idea: collect everything a DBA looks at on a server, then have an AI review it with you.
The core workflow is three steps. A health check collection runs 45 diagnostic scripts against an instance and saves each result as a CSV. A rules review turns those CSVs into deterministic CRITICAL / WARNING / INFO findings. Then an AI assessment reads the whole collection and does what fixed thresholds can't — correlates findings across the CSVs into root causes and writes a prioritized report with evidence and a fix for each issue. It's a second reviewer that has read every output, doesn't get tired, and surfaces the blindspots you'd miss at 2am.
Underneath that sits everything else a production DBA needs, usable on its own:
Every script came from a real situation: an incident, a migration window, a client handover, or a routine check that needed to be fast and safe. It runs against localhost by default, a named instance when you pass one, or a server list via the multi-server scripts.
Everything is read-only by default. Every script has a header with what permissions it needs and what it touches. Nothing phones home, nothing requires a framework — and nothing is sent to any AI until you run the assessment step yourself.
Clone the repo and run the setup script. This assumes a local SQL Server is installed, no flags needed:
git clone https://github.com/peterwhyte-lgtm/dba-tools
cd dba-tools
.\Initialize-Environment.ps1
This checks PowerShell version, installs the SqlServer module if missing, creates output directories, and verifies the connection. Pass or fail, it tells you exactly what to do next.
To target a remote or named instance instead, pass -ServerInstance:
.\Initialize-Environment.ps1 -ServerInstance PROD01\SQL2025
Once setup passes, the server is saved for the session and every script picks it up automatically — no -ServerInstance flag needed on each run.
Full prerequisites and troubleshooting: SETUP.md
The flagship workflow. Three commands take a server from "no idea" to a prioritized written assessment:
.\powershell\reporting\Invoke-HealthCheckCollection.ps1 -ServerInstance PROD01\SQL2025 # 1. collect
.\powershell\reporting\Review-HealthCheckOutput.ps1 # 2. rules review
.\powershell\reporting\Invoke-AiAssessment.ps1 # 3. AI assessment
Step 1 collects 45 scripts in a single pass — backups, waits, blocking, memory, disk, security surface area, agent jobs, integrity checks, and more — into one timestamped folder of CSVs.
Step 2 applies fixed rules: missing or stale backups, databases not online, stale DBCC CHECKDB, suspect pages, sa enabled, percent-based autogrowth, unconfigured max server memory, I/O latency above threshold, transaction log pressure, high VLF count, maintenance job failures.
Step 3 is the point of the collection. The AI reads every CSV and correlates what the rules can't: the missing index findings that line up with the top CPU queries, the autogrowth history that explains the VLF count, the weak login that's also a sysadmin. The output is a written report — verdict, priority issues with evidence and a fix for each, security posture, watch list — saved to output-files\assessments\.
Two ways to run the AI step, both driven by the same rubric:
Invoke-AiAssessment.ps1, scriptable and schedulable. Works with a personal key at home or a corporate key/gateway at work; nothing account-related is stored in the repo. -DryRun writes the exact prompt to a file without calling any API, so a corporate review can see byte-for-byte what would be sent.Setup for both paths, including the corporate data-review question: docs/ai-assessment.md
For a client handover or ownership review, there's also a scored markdown report with no AI dependency:
.\powershell\reporting\Invoke-AssessmentReport.ps1 -ServerInstance PROD01\SQL2025 -AssessedBy "Peter Whyte"
A local browser dashboard where collection output is viewed and signed off. One Collect action feeds every page:
.\web-ui\Start-WebUi.ps1
# Opens at http://localhost:8787
Runs on localhost:8787 only. The server itself has no external dependencies; the browser chart view loads Chart.js from a CDN. The UI is optional: every workflow above works from the terminal alone. A multi-server fleet dashboard is on the roadmap.
Everything above assumes you are the one asking. mcp/ ships the same reference as an
MCP server, so an AI assistant can look things up here instead
of answering from memory — which is where confident, wrong SQL Server answers come from.
pip install "sqldba-mcp @ git+https://github.com/peterwhyte-lgtm/dba-tools.git#subdirectory=mcp"
Six tools, and the ceiling is deliberate — a test fails the build if a seventh appears:
| Tool | Answers |
|---|---|
lookup_error | an error number, or a phrase from the message |
explain_wait | a wait type, and whether it is worth chasing |
check_build | a build number, version year or pasted @@VERSION → CU, KB, support dates |
find_script | "which script does X", with the safety class attached |
get_script | the script body, verbatim from this repo |
answer_question | an operational how/why question, from published write-ups |
run_script tool.
The datasets ship inside the package, so it works on an air-gapped box.mcp/tests/real_questions.py, which
asks from outside the corpus rather than rewording the corpus back at itself.The reference behind the tools is the blog's pillar libraries: the Error Library, the Wait Types Library, the builds and support lifecycle list, and the DBA Scripts hub.
Full write-up, including what the numbers do and do not prove: The sqldba MCP Server.
Browse sql/ and copy directly into SSMS. No parameters, no magic variables, no install. Every script is a single result set.
| Category | What you get |
|---|---|
sql/performance/ | Wait stats, blocking chains, active requests, long queries, missing indexes, deadlocks, plan cache, heaps, unused indexes |
sql/monitoring/ | Instance config score, database health, TempDB, memory, MAXDOP, SQL Agent jobs, disk, VLF count, autogrowth history |
sql/backups/ | Coverage by database, history, backup age, encryption status, restore duration estimates |
sql/security/ | Sysadmin members, login audit, orphaned users, weak logins, linked server security, database permissions |
sql/migration/ | Risk assessment, compatibility audit, deprecated features, login inventory, DDL generators |
sql/high-availability/ | AG replica health, sync state, latency, readable secondary usage |
sql/maintenance/ | Generate backup jobs, index maintenance jobs, housekeeping DDL, maintenance job status |
Full list with descriptions and companion posts: docs/script-catalog.md. Folder map and what is safe to run: sql/README.md.
The same scripts, callable by name from any directory. No paths, no module dependencies beyond the SqlServer module.
# Run any script by name — fuzzy match. Results always saved to output-files/ as CSV.
.\run.ps1 Get-WaitStatistics
.\run.ps1 Get-BlockingChains -ServerInstance PROD01\SQL2025
.\run.ps1 Get-BackupCoverage -OutputFormat Csv # CSV only, no terminal output
# Set a server once for the session — every script picks it up
.\tools\local-sql\Set-SqlConnection.ps1 -ServerInstance PROD01\SQL2025
.\run.ps1 Get-WaitStatistics
docs/ops/ covers the planned work — the things you need to get right before and during a maintenance window, not the things you're diagnosing in the moment.
Change orders — CAB-ready approval documents for version upgrades, server migrations, and AG failovers. Pre/post checks and rollback criteria included.
Execution checklists — step-by-step guides for AG cluster migration, standalone server replacement, DR failover, and SQL version upgrades. Written for the person executing, not the person reviewing.
Runbooks — full playbooks covering standalone migration, AG cluster migration, OS upgrade, edition change, and version upgrade. What to do, in what order, with decision points for when things go sideways.
Change templates — SQL for TDE, CDC, mirroring, AG configuration, statistics maintenance, DBCC patterns, and patching. Copy the template, fill in the variables, review before executing.
Run against the source server before a migration window:
# Pre-migration risk scan — HIGH/MEDIUM/INFO findings across compat, features, logins, config
.\powershell\migration\Invoke-PreMigrationAssessment.ps1 -ServerInstance PROD01\SQL2025
# Capture baseline metrics for before/after comparison
.\powershell\migration\Export-MigrationBaseline.ps1 -ServerInstance PROD01\SQL2025 -Label pre
Covers: compatibility gaps, deprecated features in active use, edition-only features, linked server dependencies, AG membership, login inventory with migration risk, post-migration validation checklist.
| Minimum | Recommended | |
|---|---|---|
| SQL Server | 2016 (13.x) | 2019+ |
| PowerShell | 7 | 7+ |
| SQL execution | sqlcmd.exe on PATH | SqlServer module (Invoke-Sqlcmd) |
| Permissions | VIEW SERVER STATE, VIEW ANY DATABASE | Same |
The SQL scripts themselves need no PowerShell at all — open them from sql/ and paste into SSMS. The
tooling around them (run.ps1, the wrappers, the health check) uses PowerShell 7 syntax; run.ps1
hands off to pwsh automatically if you start it from Windows PowerShell 5.1, but pwsh has to be
installed. winget install Microsoft.PowerShell.
Install-Module -Name SqlServer -Scope CurrentUser -Force
The AI assessment step additionally needs either Claude Code (signed in) or an ANTHROPIC_API_KEY — see docs/ai-assessment.md. Everything else runs fully local.
See CONTRIBUTING.md. This is Peter's toolkit — contributions are welcome, but scope and direction are his call. Scripts must be read-only, single result set, and include the standard header.