返回顶部
m

mssql

Execute SQL Server queries and export results as delimiter-separated text. Use when the user asks to fetch, insert, update, or manage data in Microsoft SQL Server, validate BI/reporting numbers, or prepare datasets for charts.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.2
安全检测
已通过
147
下载量
0
收藏
概述
安装方式
版本历史

mssql

# MSSQL Run SQL Server queries using `scripts/mssql_query.sh`. ## Quick start 1. Ensure credentials exist at: `~/.openclaw/credentials/mssql.env` 2. Run a query: `bash skills/mssql/scripts/mssql_query.sh --query "SELECT TOP 20 name FROM sys.tables"` 3. Save to file: `bash skills/mssql/scripts/mssql_query.sh --query "SELECT TOP 100 * FROM dbo.MyTable" --out /tmp/mytable.dsv` ## Credentials format Expected env vars in `~/.openclaw/credentials/mssql.env`: - `MSSQL_HOST` - `MSSQL_DB` - `MSSQL_USER` - `MSSQL_PASSWORD` - Optional: `MSSQL_PORT` (default `1433`), `MSSQL_ENCRYPT` (`yes`/`no`, default `yes`), `MSSQL_TRUST_CERT` (`yes`/`no`, default `no`), `SQLCMD_BIN` The credential file path can be overridden with the `MSSQL_ENV_FILE` environment variable. ## Permissions Query permissions are controlled entirely at the SQL Server user level. The script does not impose any restrictions on query type — the database user's grants determine what is allowed. ## Database reference map Place your database map at `references/DB_MAP.md` inside this skill folder. This file tells the agent which databases, schemas, and tables to use and how they relate to each other. See `references/DB_MAP.example.md` for the expected format. ## Useful patterns - Run long query from file: `bash skills/mssql/scripts/mssql_query.sh --file /path/query.sql --out /tmp/out.dsv` - Override database: `bash skills/mssql/scripts/mssql_query.sh --db OtherDB --query "SELECT TOP 10 * FROM dbo.Users"` - Change delimiter: `bash skills/mssql/scripts/mssql_query.sh --query "SELECT ..." --delim ","` - Increase timeout: `bash skills/mssql/scripts/mssql_query.sh --query "SELECT ..." --timeout 180` ## Output format Output is **delimiter-separated text**, not RFC 4180 CSV. Fields are not quoted or escaped. This works well for structured numeric and short-text data. If your columns contain embedded delimiters, quotes, or newlines, the output may be malformed — choose a delimiter that does not appear in the data, or post-process the output. ## Best practices - Prefer explicit columns over `SELECT *`. - Use `TOP` for exploratory samples. - Keep queries scoped to the user request. - Answer in business language by default; provide SQL details when requested. - Never print or expose credentials in responses. ## Troubleshooting - `sqlcmd not found` -> install sqlcmd v18+ or set `SQLCMD_BIN`. - TLS/certificate issues on internal networks -> set `MSSQL_TRUST_CERT=yes` in your credentials file. The default is `no` (certificate validation enabled).

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 mssql-1776071951 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 mssql-1776071951 技能

通过命令行安装

skillhub install mssql-1776071951

下载 Zip 包

⬇ 下载 mssql v1.0.2

文件大小: 4.36 KB | 发布时间: 2026-4-14 14:28

v1.0.2 最新 2026-4-14 14:28
v1.0.2 — Declare required env vars in metadata

- Added MSSQL_HOST, MSSQL_DB, MSSQL_USER, MSSQL_PASSWORD to requires.env
- Fixes manifest/metadata inconsistency flagged by ClawHub security scan

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部