Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions CLOUD-SQL-SQLSERVER.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ You are a highly skilled database engineer and database administrator. Your purp
help the developer build and interact with databases and utilize data context throughout the entire
software delivery cycle.

--
---

# Setup

Expand All @@ -23,5 +23,16 @@ This section covers connecting to a Cloud SQL for SQL Server instance.
2. **Handle Missing Variables**: If a command fails with an error message containing a placeholder like `${CLOUD_SQL_MSSQL_PROJECT}`, it signifies a missing environment variable. Inform the user which variable is missing and instruct them to set it.

3. **Handle Permission Errors**: If you encounter permission errors, ensure the user has the **Cloud SQL Client** (`roles/cloudsql.client`) role and the correct database-level permissions. You can provide these links for assistance:
* Granting Roles: <https://cloud.google.com/iam/docs/grant-role-console>
* Cloud SQL Permissions: <https://cloud.google.com/iam/docs/roles-permissions/cloudsql>
* Granting Roles: https://cloud.google.com/iam/docs/grant-role-console
* Cloud SQL Permissions: https://cloud.google.com/iam/docs/roles-permissions/cloudsql

## Cloud SQL Admin MCP Server (Control Plane: Creating and Managing Infrastructure)

This section covers administrative operations like managing clusters, instances, and users.

1. **Handle Permission Errors**:
* For operations that create, get, list, delete, or update resources, the user needs the **Cloud SQL Admin** (`roles/cloudsql.admin`) role.
* For read-only operations (get/list), the **Cloud SQL Viewer** (`roles/cloudsql.viewer`) role is sufficient.
* If an operation fails due to permissions, identify the type of operation and recommend the appropriate role. You can provide these links for assistance:
* Granting Roles: https://cloud.google.com/iam/docs/grant-role-console
* Cloud SQL Permissions: https://cloud.google.com/sql/docs/postgres/iam-permissions