Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Commit d4fcfea

Browse files
committed
docs(sql): Add Azure SQL Operations section with command examples to azmcp-commands.md
1 parent ebf977f commit d4fcfea

File tree

2 files changed

+40
-8
lines changed

2 files changed

+40
-8
lines changed

docs/azmcp-commands.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,46 @@ azmcp extension az --command "storage account show --name <account-name> --resou
266266
azmcp extension az --command "vm list --resource-group <resource-group>"
267267
```
268268

269+
### Azure SQL Operations
270+
```bash
271+
# List SQL servers in a subscription
272+
azmcp sql server list --subscription <subscription>
273+
274+
# List databases in a SQL server
275+
azmcp sql db list --subscription <subscription> --server <server-name> --resource-group <resource-group>
276+
277+
# Get SQL database advisor recommendations for performance optimization
278+
azmcp sql db advise --subscription <subscription> \
279+
--server <server-name> \
280+
--resource-group <resource-group> \
281+
--database <database-name> \
282+
[--table <table-name>] \
283+
[--minimum-impact <impact-threshold>] \
284+
[--advisor-type <advisor-type>]
285+
286+
# Examples:
287+
# Get all recommendations for a database
288+
azmcp sql db advise --subscription <subscription> \
289+
--server "myserver" \
290+
--resource-group "myrg" \
291+
--database "mydatabase"
292+
293+
# Get CreateIndex recommendations with minimum impact of 50
294+
azmcp sql db advise --subscription <subscription> \
295+
--server "myserver" \
296+
--resource-group "myrg" \
297+
--database "mydatabase" \
298+
--advisor-type "CreateIndex" \
299+
--minimum-impact 50
300+
301+
# Get recommendations for a specific table
302+
azmcp sql db advise --subscription <subscription> \
303+
--server "myserver" \
304+
--resource-group "myrg" \
305+
--database "mydatabase" \
306+
--table "Users"
307+
```
308+
269309
### Azure AI Search
270310

271311
```bash

src/Commands/Sql/Db/DbAdviseCommand.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,6 @@ Optimize and improve performance of your Azure SQL database by getting intellige
3939
- Reduce database costs through better resource utilization
4040
- Get AI-powered insights for database tuning
4141
- Identify and fix performance regressions
42-
43-
Required options:
44-
- database: The name of the database to analyze and optimize
45-
- server-name: The name of the SQL server containing the database
46-
Optional:
47-
- table: Focus optimization recommendations on a specific table
48-
- minimum-impact: Set minimum performance impact threshold for recommendations
49-
- advisor-type: Filter by specific advisor type (CreateIndex, DropIndex, ForceLastGoodPlan, DbParameterization)
5042
""";
5143

5244
protected override void RegisterOptions(Command command)

0 commit comments

Comments
 (0)