last30days-skill
AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
Read-only SQL Server DBA tools: health checks, waits, slow queries, indexes, backups.
Skills that teach the AI this kind of work; they work alongside this one
AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.
Open-source intelligence for the global theater. Track everything from the corporate/private jets of the wealthy, and spy satellites, to seismic events in one unified interface. Hook an AI agent up to have it parse through data and find previously unseen correlations. The knowledge is available to…
Lists are ordered by a usage score (out of 100) built from these parts
| Popularity | 0/80 | GitHub stars or weekly downloads: the larger counts 60, the smaller 20 |
|---|---|---|
| Freshness | 12/12 | Full marks for a release or code change within 30 days |
| Still answering | 0/8 | The cloud endpoint answered at the last check |
| Usage score | 12/100 |
Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)
Pick the AI app you use, then copy the settings.
Let your AI install it with one sentence
Please install SQL Server DBA (read-only). Follow https://mcp.popnx.com/i/shadow-dba-mssql-dba-mcp.md, show me the commands and wait for my OK before running them.Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads
Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 25, 2026
First: which AI do you use?
Pick your app and the steps appear below.
Works with Claude, with some setup first
You need a SQL Server DBA (read-only) key (create it on the maker’s site) · 3 setting(s) to fill in (DB_HOST, DB_NAME, DB_USER) · Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.
Please install the MCP server SQL Server DBA (read-only) for Claude on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "mssql-dba": { "command": "npx", "args": [ "-y", "@shadow-dba/mssql-dba-mcp" ], "env": { "DB_AUTH_TYPE": "your-value", "DB_HOST": "your-value", "DB_NAME": "your-value", "DB_USER": "your-value", "DB_PASSWORD": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For DB_AUTH_TYPE, DB_PASSWORD, DB_HOST, DB_NAME, DB_USER, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the SQL Server DBA (read-only) tools really show up.This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.
Already installed? Check first · Open Terminal, type this command and press Enter
node -vMac: press ⌘ + Space, type Terminal, press Enter
Windows: open Start, type Windows PowerShell, then Open
Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed
Open the Node.js download page ↗
When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v
Install once; it works for everything that needs Node.js
Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.
These are program settings, not keys. No sign-up needed; fill them in as the maker describes.
DB_HOST SQL Server host name or IPDB_NAME Database to connect to, for example masterDB_USER Read-only login (see README, Permissions)Descriptions are as written by the maker.
SettingsDeveloperEdit Config
{
"mcpServers": {
"mssql-dba": {
"command": "npx",
"args": [
"-y",
"@shadow-dba/mssql-dba-mcp"
],
"env": {
"DB_AUTH_TYPE": "your-value",
"DB_HOST": "your-value",
"DB_NAME": "your-value",
"DB_USER": "your-value",
"DB_PASSWORD": "your-value"
}
}
}
}Paste the key only into the app’s field, never into a chat or to anyone
Use SQL Server DBA (read-only) and tell me what you can do for me, then show me one thing✓ If Claude says it is using SQL Server DBA (read-only) or shows a SQL Server DBA (read-only) tool in the answer, you are connected
The command above works without these. Add them only if you want to change something, following the maker’s description.
DB_PORT Server port · default 1433TRUST_SERVER_CERTIFICATE true accepts a self-signed certificate · default falseDescriptions are as written by the maker.
Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version
ChatGPT cannot connect SQL Server DBA (read-only) yet
SQL Server DBA (read-only) runs on your computer, but ChatGPT can only connect servers that run on the web
A · Use an app that can connect SQL Server DBA (read-only)
B · Others in Databases & datasets that work with ChatGPT
Picked from the most used in the same category, only ones that connect by address with no key
Works with Claude Code, with some setup first
You need a SQL Server DBA (read-only) key (create it on the maker’s site) · 3 setting(s) to fill in (DB_HOST, DB_NAME, DB_USER) · Install Node.js on your computer first (one time)
Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.
Please install the MCP server SQL Server DBA (read-only) for Claude Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user mssql-dba --env DB_AUTH_TYPE=your-value --env DB_HOST=your-value --env DB_NAME=your-value --env DB_USER=your-value --env DB_PASSWORD=your-value -- npx -y @shadow-dba/mssql-dba-mcp 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For DB_AUTH_TYPE, DB_PASSWORD, DB_HOST, DB_NAME, DB_USER, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the SQL Server DBA (read-only) tools really show up.This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.
Already installed? Check first · Open Terminal, type this command and press Enter
node -vMac: press ⌘ + Space, type Terminal, press Enter
Windows: open Start, type Windows PowerShell, then Open
Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed
Open the Node.js download page ↗
When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v
Install once; it works for everything that needs Node.js
Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.
These are program settings, not keys. No sign-up needed; fill them in as the maker describes.
DB_HOST SQL Server host name or IPDB_NAME Database to connect to, for example masterDB_USER Read-only login (see README, Permissions)Descriptions are as written by the maker.
Mac: press Command+Space and type Terminal · Windows: open PowerShell
claude mcp add --scope user mssql-dba --env DB_AUTH_TYPE=your-value --env DB_HOST=your-value --env DB_NAME=your-value --env DB_USER=your-value --env DB_PASSWORD=your-value -- npx -y @shadow-dba/mssql-dba-mcpReplace “your-value” with your key before pressing Enter
Paste the key only into the app’s field, never into a chat or to anyone
You should see SQL Server DBA (read-only) listed as connected
Use SQL Server DBA (read-only) and tell me what you can do for me, then show me one thing✓ If Claude Code says it is using SQL Server DBA (read-only) or shows a SQL Server DBA (read-only) tool in the answer, you are connected
The command above works without these. Add them only if you want to change something, following the maker’s description.
DB_PORT Server port · default 1433TRUST_SERVER_CERTIFICATE true accepts a self-signed certificate · default falseDescriptions are as written by the maker.
Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Works with Cursor, with some setup first
You need a SQL Server DBA (read-only) key (create it on the maker’s site) · 3 setting(s) to fill in (DB_HOST, DB_NAME, DB_USER) · Install Node.js on your computer first (one time)
Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.
Please install the MCP server SQL Server DBA (read-only) for Cursor on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "mssql-dba": { "command": "npx", "args": [ "-y", "@shadow-dba/mssql-dba-mcp" ], "env": { "DB_AUTH_TYPE": "your-value", "DB_HOST": "your-value", "DB_NAME": "your-value", "DB_USER": "your-value", "DB_PASSWORD": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For DB_AUTH_TYPE, DB_PASSWORD, DB_HOST, DB_NAME, DB_USER, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the SQL Server DBA (read-only) tools really show up.This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.
Already installed? Check first · Open Terminal, type this command and press Enter
node -vMac: press ⌘ + Space, type Terminal, press Enter
Windows: open Start, type Windows PowerShell, then Open
Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed
Open the Node.js download page ↗
When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v
Install once; it works for everything that needs Node.js
Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.
These are program settings, not keys. No sign-up needed; fill them in as the maker describes.
DB_HOST SQL Server host name or IPDB_NAME Database to connect to, for example masterDB_USER Read-only login (see README, Permissions)Descriptions are as written by the maker.
In the SQL Server DBA (read-only) settings, DB_AUTH_TYPE, DB_PASSWORD, DB_HOST, DB_NAME, DB_USER is empty; add your key and save
Paste the key only into the app’s field, never into a chat or to anyone
Use SQL Server DBA (read-only) and tell me what you can do for me, then show me one thing✓ If Cursor says it is using SQL Server DBA (read-only) or shows a SQL Server DBA (read-only) tool in the answer, you are connected
The command above works without these. Add them only if you want to change something, following the maker’s description.
DB_PORT Server port · default 1433TRUST_SERVER_CERTIFICATE true accepts a self-signed certificate · default falseDescriptions are as written by the maker.
Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Works with VS Code, with some setup first
You need a SQL Server DBA (read-only) key (create it on the maker’s site) · 3 setting(s) to fill in (DB_HOST, DB_NAME, DB_USER) · Install Node.js on your computer first (one time)
Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.
Please install the MCP server SQL Server DBA (read-only) for VS Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "mssql-dba": { "type": "stdio", "command": "npx", "args": [ "-y", "@shadow-dba/mssql-dba-mcp" ], "env": { "DB_AUTH_TYPE": "your-value", "DB_HOST": "your-value", "DB_NAME": "your-value", "DB_USER": "your-value", "DB_PASSWORD": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For DB_AUTH_TYPE, DB_PASSWORD, DB_HOST, DB_NAME, DB_USER, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the SQL Server DBA (read-only) tools really show up.This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.
Already installed? Check first · Open Terminal, type this command and press Enter
node -vMac: press ⌘ + Space, type Terminal, press Enter
Windows: open Start, type Windows PowerShell, then Open
Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed
Open the Node.js download page ↗
When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v
Install once; it works for everything that needs Node.js
Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.
These are program settings, not keys. No sign-up needed; fill them in as the maker describes.
DB_HOST SQL Server host name or IPDB_NAME Database to connect to, for example masterDB_USER Read-only login (see README, Permissions)Descriptions are as written by the maker.
In the SQL Server DBA (read-only) settings, DB_AUTH_TYPE, DB_PASSWORD, DB_HOST, DB_NAME, DB_USER is empty; add your key and save
Paste the key only into the app’s field, never into a chat or to anyone
Use SQL Server DBA (read-only) and tell me what you can do for me, then show me one thing✓ If VS Code says it is using SQL Server DBA (read-only) or shows a SQL Server DBA (read-only) tool in the answer, you are connected
The command above works without these. Add them only if you want to change something, following the maker’s description.
DB_PORT Server port · default 1433TRUST_SERVER_CERTIFICATE true accepts a self-signed certificate · default falseDescriptions are as written by the maker.
Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Claude Code
claude mcp add --scope user mssql-dba --env DB_AUTH_TYPE=your-value --env DB_HOST=your-value --env DB_NAME=your-value --env DB_USER=your-value --env DB_PASSWORD=your-value -- npx -y @shadow-dba/mssql-dba-mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"mssql-dba": {
"command": "npx",
"args": [
"-y",
"@shadow-dba/mssql-dba-mcp"
],
"env": {
"DB_AUTH_TYPE": "your-value",
"DB_HOST": "your-value",
"DB_NAME": "your-value",
"DB_USER": "your-value",
"DB_PASSWORD": "your-value"
}
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"mssql-dba": {
"command": "npx",
"args": [
"-y",
"@shadow-dba/mssql-dba-mcp"
],
"env": {
"DB_AUTH_TYPE": "your-value",
"DB_HOST": "your-value",
"DB_NAME": "your-value",
"DB_USER": "your-value",
"DB_PASSWORD": "your-value"
}
}
}
}VS Code (mcp.json)
{
"servers": {
"mssql-dba": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@shadow-dba/mssql-dba-mcp"
],
"env": {
"DB_AUTH_TYPE": "your-value",
"DB_HOST": "your-value",
"DB_NAME": "your-value",
"DB_USER": "your-value",
"DB_PASSWORD": "your-value"
}
}
}
}DB_AUTH_TYPE secret required envDB_HOST required envDB_NAME required envDB_USER required envDB_PASSWORD secret required envDB_PORT envTRUST_SERVER_CERTIFICATE envDescriptions are as written by the maker.
These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.
io.github.shadow-dba/mssql-dba-mcpnpm: @shadow-dba/mssql-dba-mcpBased on how this server connects and on each app’s own docs, checked Nov 10, 2026.
Run on your computer in
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
Runs on your computer; the tool list appears in your AI app after you install it.
We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 26, 2026
The registry name was verified with the GitHub account shadow-dba, which owns the repo
Code last changed yesterday
Uses MIT
This one runs on your computer; there is no internet endpoint
Runs on your computer and uses local settings instead
Runs on your computer; we can only read tool lists from internet endpoints
No entries on OSV.dev for @shadow-dba/mssql-dba-mcp@0.1.2
Checks only this package version, not every dependency · checked Nov 25, 2026
If you made this, paste this code into your README. The badge links back to this page.
[](https://mcp.popnx.com/en/servers/shadow-dba-mssql-dba-mcp)Ask, share a tip or report that it does not work. Sorted by what people marked helpful.
No posts yet. Be the first to ask or share.
Posts here are written by users, not the PopNx team.
No reviews yet
Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.
It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.
You need to fill in: DB_AUTH_TYPE, DB_PASSWORD
It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).
The GitHub repo last changed yesterday, and the latest version (0.1.2) reached the registry yesterday.
Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Node.js on your computer.
In the same category: Supabase, Neon, DBCode, Keboola MCP, WaveHouse Cloud
Same category, other makers, commands already checked. Official ones first, then by stars.
Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi
Supabase’s official server lets AI create tables, query data and review project settings in your Supabase database.
Official Neon MCP server for managing Neon projects and Lakebase Postgres databases.
Query and explore 100+ databases through your DBCode connections.
Connect your AI assistants to Keboola and expose your data, transformations, SQL queries, ...
Browse, query, and administer your managed WaveHouse + ClickHouse projects (schema, pipes, policy).
| This one SQL Server DBA (read-only) | Supabase | Neon | DBCode | Keboola MCP | WaveHouse Cloud | |
|---|---|---|---|---|---|---|
| Runs where | Installs on your computer | Cloud or install on your computer | Runs in the cloud, nothing to install | Installs on your computer | Cloud or install on your computer | Runs in the cloud, nothing to install |
| Needs a key | Yes | Yes | No | No | No | No |
| Add with + in Claude | No | Yes | Yes | No | No | No |
| Basic checks | 3/3 | 5/5 | 5/5 | 2/3 | 5/5 | 4/4 |
| License | MIT | Apache-2.0 | MIT | NOASSERTION | MIT | Apache-2.0 |
| Price | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry | No cost listed in the registry |
Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.
Read-only SQL Server DBA tools for AI agents. AI can never modify your database.
mssql-dba-mcp is an MCP server. It gives Claude Code, Claude Desktop, Cursor, VS Code and other MCP clients 42 tools to look at a SQL Server the way a DBA does: health checks, wait stats, slow queries and their plans, blocking, indexes, backups, CHECKDB, Agent jobs, the error log, configuration, security and schema design.
It only looks. The AI can suggest a fix (an index, a setting, a script), but you decide whether to run it.
You need Node.js 20.12 or later and a SQL Server 2016+, Azure SQL Managed Instance or Azure SQL Database.
1. Create a read-only login. Run the setup script as a sysadmin. The server refuses to start with sa or any other admin login.
2. Add the server to your MCP client. Claude Code:
claude mcp add mssql-dba \
-e DB_AUTH_TYPE=sql -e DB_HOST=localhost -e DB_NAME=master \ -e DB_USER=shadow-dba -e DB_PASSWORD='YourStrongPasswordHere' \ -- npx -y @shadow-dba/mssql-dba-mcp
Other clients (Claude Desktop, Cursor, VS Code) use the same command in their JSON config:
{
"mcpServers": { "mssql-dba": { "command": "npx", "args": ["-y", "@shadow-dba/mssql-dba-mcp"], "env": { "DB_AUTH_TYPE": "sql", "DB_HOST": "localhost", "DB_NAME": "master", "DB_USER": "shadow-dba", "DB_PASSWORD": "YourStrongPasswordHere" } } } }
To keep the password out of the client config, leave out env and put the same values in a .env file in the folder the client starts the server from (see .env.example). The server reads ./.env itself.
3. Ask. For example: *"Run a health check on this server"*, *"Why is the server slow right now?"* or *"Which indexes on dbo.Posts in StackOverflow are never used?"*
Want ready-made DBA skills (health check, plan analysis, index review) on top of these tools? Use the shadow-dba CLI: npx shadow-dba workspace init sets up a Claude Code workspace with this server and the skills.
VIEW permissions and SELECT on a few msdb tables; nothing that can write, and nothing that reads rows from your own tables. At startup the server checks the login and refuses to run if it is a member of sysadmin, has CONTROL SERVER, or is db_owner in DB_NAME. This is the real guarantee: SQL Server itself blocks every change, whatever the AI sends.mssql_run_select runs a query the AI writes. A lexer checks it first: exactly one statement, it must start with SELECT or WITH, and any word that writes, runs code or changes the session (INSERT, UPDATE, EXEC, SET, USE, SELECT INTO, DBCC, BACKUP, ...) rejects it. Strings, quoted names and comments cannot hide code. This matters because tool output contains text other people control (query text from the plan cache, error-log lines, object names), and a prompt injection in that text could ask the AI to send a crafted query.Layer 3 is a second line of defense, not the guarantee. If you run with a privileged login (MSSQL_ALLOW_PRIVILEGED_LOGIN=true), a bypass of layer 3 could change your data. Found a bypass? See SECURITY.md.
What the AI can see: metadata (names of databases, tables, columns, indexes, logins, jobs), server settings, query text in the plan cache and running requests (it can contain literal values), error-log lines and Agent job messages. By default it cannot read rows from your own tables, and it cannot see job step commands in msdb, which can hold passwords. Giving it table data is a separate decision with real consequences: see Business data.
Every tool is read-only. Output is Markdown, capped at 200 rows per table and 40,000 characters per reply, with a "Showing N of M" note when something was cut. Database tools take an optional databaseName (default: DB_NAME).
Start here
| Tool | What it returns |
|---|---|
mssql_server_version | Version, edition, patch level, collation, HADR, licensing. First call in a health check. |
mssql_wait_stats | Top wait types. sampleSeconds=5 shows what the server waits on right now. |
mssql_top_queries | Top queries by CPU, reads, memory grant, spills, duration or executions, with plan handles. |
mssql_run_select | One read-only SELECT the AI writes (system views, DMVs). Max 500 rows. |
Performance, now
| Tool | What it returns |
|---|---|
mssql_execution_plan | Cached plan XML for a plan handle (never runs the query). |
mssql_running_requests | Active requests: CPU, reads, waits, blocking, statement. |
mssql_blocking | Blocked sessions and who blocks them. |
mssql_memory_pressure | Page Life Expectancy. |
mssql_buffer_hit_ratio | Buffer cache hit ratio. |
mssql_disk_io_latency | Read/write latency per database file, rated. |
mssql_tempdb_health | TempDB files, space use, top sessions. |
Instance health
| Tool | What it returns |
|---|---|
mssql_server_timezone | Server time, UTC offset. |
mssql_storage_capacity | Drives with less than 10% free space. |
mssql_server_config | sp_configure settings with risky values flagged. |
mssql_error_log | SQL Server or Agent error log, filtered, newest first. |
mssql_all_db_info | Every database: state, recovery model, compatibility, size. |
mssql_offline_db | Databases that are not ONLINE. |
mssql_db_config_health | Risky database settings (auto shrink, page verify, Query Store, ...). |
mssql_db_owners | Databases not owned by sa, orphaned owners. |
mssql_recent_backups | Latest Full, Diff and Log backup per database. |
mssql_checkdb_status | Last good CHECKDB per database, suspect pages. |
mssql_vlf_counts | Databases with too many virtual log files. |
mssql_autogrowth_issues | Files with percent, tiny or disabled autogrowth. |
mssql_agent_jobs | SQL Agent jobs, schedules, last run. |
mssql_agent_failed_jobs | Agent jobs that failed in the last 7 days. |
mssql_agent_alerts | Alerts for errors 823/824/825 and severities 19-25, operators. |
mssql_privileged_logins | Members of sysadmin and securityadmin. |
One database
| Tool | What it returns |
|---|---|
mssql_db_info | State, recovery model, compatibility, size. |
mssql_db_collation | Default collation. |
mssql_db_collation_mismatches | Columns with a different collation. |
mssql_db_tables | Every table: rows, size, keys, index health, workload. |
mssql_db_index_health | Every index: usage, fragmentation, fill factor, maintenance script. |
mssql_db_missing_indexes | Missing-index suggestions, ranked. |
mssql_db_backup_history | Backups of the last 7 days. |
mssql_db_table_keys | Heaps, tables without a primary key. |
mssql_db_foreign_keys | Untrusted, disabled or unindexed foreign keys, likely missing ones. |
mssql_db_check_constraints | Untrusted or disabled check constraints, with the fix. |
mssql_db_identity_headroom | Identity columns close to their type limit. |
mssql_db_column_design_issues | Deprecated and risky column types, too-wide rows. |
mssql_table_info | Details for the given tables (tableNames). |
mssql_table_index_health | Index health for the given tables. |
mssql_table_missing_indexes | Missing indexes for the given tables. |
Run one of these scripts as a sysadmin. Each creates the login and grants what the tools need. Permissions are server-wide: database tools can look at any database, including ones created later. The scripts can run again: an existing login or user is kept (with its password) and only the grants are applied.
DB_AUTH_TYPE=sql)USE [master];
GO IF SUSER_ID(N'shadow-dba') IS NULL CREATE LOGIN [shadow-dba] WITH PASSWORD = 'YourStrongPasswordHere'; GO GRANT VIEW SERVER STATE TO [shadow-dba]; GRANT VIEW ANY DEFINITION TO [shadow-dba]; GRANT CONNECT ANY DATABASE TO [shadow-dba]; -- Error log access. SQL Server 2022+ and Managed Instance have a permission for it; -- 2016-2019 need EXECUTE on the procedure that reads the log (it only reads). IF CAST(SERVERPROPERTY('ProductMajorVersion') AS INT) >= 16 OR SERVERPROPERTY('EngineEdition') = 8 EXEC (N'GRANT VIEW ANY ERROR LOG TO [shadow-dba];'); ELSE BEGIN IF USER_ID(N'shadow-dba') IS NULL EXEC (N'CREATE USER [shadow-dba] FOR LOGIN [shadow-dba];'); EXEC (N'GRANT EXECUTE ON xp_readerrorlog TO [shadow-dba];'); END; GO
-- msdb: SELECT on exactly the tables the tools read. No Agent roles: SQLAgentReaderRole -- can create and change jobs. USE [msdb]; GO IF USER_ID(N'shadow-dba') IS NULL CREATE USER [shadow-dba] FOR LOGIN [shadow-dba]; GO GRANT SELECT ON dbo.backupset TO [shadow-dba]; GRANT SELECT ON dbo.backupmediafamily TO [shadow-dba]; GRANT SELECT ON dbo.suspect_pages TO [shadow-dba]; GRANT SELECT ON dbo.sysjobs TO [shadow-dba]; GRANT SELECT ON dbo.sysjobhistory TO [shadow-dba]; GRANT SELECT ON dbo.sysjobschedules TO [shadow-dba]; GRANT SELECT ON dbo.sysschedules TO [shadow-dba]; GRANT SELECT ON dbo.sysalerts TO [shadow-dba]; GRANT SELECT ON dbo.sysoperators TO [shadow-dba]; GRANT EXECUTE ON dbo.agent_datetime TO [shadow-dba]; -- Job step commands can hold passwords. Not granted; the DENY keeps them hidden even if -- someone later adds a wider grant such as SELECT ALL USER SECURABLES. DENY SELECT ON dbo.sysjobsteps TO [shadow-dba]; GO
Then set DB_USER=shadow-dba and DB_PASSWORD=YourStrongPasswordHere.
DB_AUTH_TYPE=windows)Same script with CREATE LOGIN [DOMAIN\shadow-dba] FROM WINDOWS; instead of the CREATE LOGIN line, and [DOMAIN\shadow-dba] instead of [shadow-dba] everywhere (MACHINE\shadow-dba for a local account). Set DB_USER and DB_PASSWORD to that account's name and password (NTLM cannot reuse your logged-in session), and DB_DOMAIN for a domain account.
There are no server permissions and no msdb. Run this in the database you set as DB_NAME (a contained user, so use DB_AUTH_TYPE=sql):
IF USER_ID(N'shadow-dba') IS NULL
CREATE USER [shadow-dba] WITH PASSWORD = 'YourStrongPasswordHere'; GRANT VIEW DATABASE STATE TO [shadow-dba]; GRANT VIEW DEFINITION TO [shadow-dba];
| Permission | Used for |
|---|---|
VIEW SERVER STATE | Instance DMVs: waits, requests, memory, blocking, I/O, plan cache, VLFs. |
VIEW ANY DEFINITION | Schema and index metadata in every database; the full member list for mssql_privileged_logins. |
CONNECT ANY DATABASE | Enter every database (current and future) without a user in each one. |
VIEW ANY ERROR LOG |