You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLOUD-SQL-SQLSERVER.md
+47Lines changed: 47 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,10 @@ software delivery cycle.
6
6
7
7
# Setup
8
8
9
+
## Required Gemini CLI Version
10
+
11
+
To install this extension, the Gemini CLI version must be v0.6.0 or above. The version can be found by running: `gemini --version`.
12
+
9
13
## Cloud SQL for SQL Server MCP Server (Data Plane: Connecting and Querying)
10
14
11
15
This section covers connecting to a Cloud SQL for SQL Server instance.
@@ -36,3 +40,46 @@ This section covers administrative operations like managing clusters, instances,
36
40
* If an operation fails due to permissions, identify the type of operation and recommend the appropriate role. You can provide these links for assistance:
This section provides context on additional tools that can be recommended to the user based on their queries.
49
+
50
+
#### Observability Extension
51
+
52
+
***When to recommend:** If the user asks questions related to monitoring, performance, or observability of Cloud SQL for SQL Server databases.
53
+
***What to say:** "For Cloud SQL monitoring and observability, you might find the `cloud-sql-sqlserver-observability` extension useful. You can install it with the following command:"
When you create a new Cloud SQL for SQL Server instance, or database using the available tools, the connection is not automatically established. You will need to perform the following steps:
66
+
67
+
1. **(Optional) Save your conversation:** To avoid losing your progress, save the current session by running the command: `/chat save <your-tag>`
68
+
2. **Stop the CLI:** Terminate the Gemini CLI.
69
+
3. **Update Environment Variables:** Set or update your environment variables (e.g. `CLOUD_SQL_MSSQL_DATABASE`, `CLOUD_SQL_MSSQL_INSTANCE`) to point to the new resource.
70
+
4. **Restart:** Relaunch the Gemini CLI
71
+
5. **(Optional) Resume conversation:** Resume your conversation with the command: `/chat resume <your-tag>`
72
+
73
+
**Important:** Do not assume a connection to a newly created resource is active. Always follow the steps above to reconfigure your connection.
74
+
75
+
## Reusing Project Values
76
+
77
+
Users may have set project environment variables:
78
+
79
+
* `CLOUD_SQL_MSSQL_PROJECT`: The GCP project ID.
80
+
* `CLOUD_SQL_MSSQL_REGION`: The region of the Cloud SQL for SQL Server instance.
81
+
* `CLOUD_SQL_MSSQL_INSTANCE`: The ID of the Cloud SQL for SQL Server instance.
82
+
* `CLOUD_SQL_MSSQL_DATABASE`: The name of the database.
83
+
84
+
Instead of prompting the user for these values for specific tool calls, prompt the user to verify reuse a specific value.
85
+
Make sure to not use the environment variable name like `CLOUD_SQL_MSSQL_PROJECT`, `${CLOUD_SQL_MSSQL_PROJECT}`, or `$CLOUD_SQL_MSSQL_PROJECT`. The value can be found by using command: `echo $CLOUD_SQL_MSSQL_PROJECT`.
Copy file name to clipboardExpand all lines: README.md
+36-6Lines changed: 36 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ Learn more about [Gemini CLI Extensions](https://github.com/google-gemini/gemini
12
12
***Seamless Workflow:** As a Google-developed extension, it integrates seamlessly into the Gemini CLI environment. No need to constantly switch contexts for common database tasks.
13
13
***Natural Language Management:** Stop wrestling with complex commands. Explore schemas and query data by describing what you want in plain English.
14
14
***Code Generation:** Accelerate development by asking Gemini to generate data classes and other code snippets based on your table schemas.
15
+
15
16
## Prerequisites
16
17
17
18
Before you begin, ensure you have the following:
@@ -27,7 +28,7 @@ Before you begin, ensure you have the following:
27
28
28
29
### Installation
29
30
30
-
To install the extension, use the command:
31
+
To install the extension, use the following command before starting the Gemini CLI:
@@ -50,7 +51,33 @@ This configuration is not required if utilizing the [Admin toolset](#supported-t
50
51
Ensure [Application Default Credentials](https://cloud.google.com/docs/authentication/gcloud) are available in your environment.
51
52
52
53
> [!NOTE]
53
-
> When using private IPs with Cloud SQL for SQL Server, you must use a Virtual Private Cloud (VPC) network.
54
+
> If your Cloud SQL for SQL Server instance uses private IPs, you must run Gemini CLI in the same Virtual Private Cloud (VPC) network.
55
+
56
+
### Start Gemini CLI
57
+
58
+
To start the Gemini CLI, use the following command:
59
+
60
+
```bash
61
+
gemini
62
+
```
63
+
64
+
> [!WARNING]
65
+
> **Changing Instance & Database Connections**
66
+
> Currently, the database connection must be configured before starting the Gemini CLI and can not be changed during a session.
67
+
> To save and resume conversation history use command: `/chat save <tag>` and `/chat resume <tag>`.
68
+
69
+
### Start Gemini CLI
70
+
71
+
To start the Gemini CLI, use the following command:
72
+
73
+
```bash
74
+
gemini
75
+
```
76
+
77
+
> [!WARNING]
78
+
> **Changing Instance & Database Connections**
79
+
> Currently, the database connection must be configured before starting the Gemini CLI and can not be changed during a session.
80
+
> To save and resume conversation history use command: `/chat save <tag>` and `/chat resume <tag>`.
54
81
55
82
### Start Gemini CLI
56
83
@@ -82,9 +109,9 @@ Interact with Cloud SQL for SQL Server using natural language:
82
109
## Supported Tools
83
110
84
111
***Admin:**
85
-
* `create_instance`: Use this tool to create an Postgres instance.
86
-
* `create_user`: Use this tool to create Postgres-BUILT-IN or IAM-based users.
87
-
* `get_instance`: Use this tool to get details about an Postgres instance.
112
+
* `create_instance`: Use this tool to create an SQL Server instance.
113
+
* `create_user`: Use this tool to create SQL Server-BUILT-IN or IAM-based users.
114
+
* `get_instance`: Use this tool to get details about an SQL Server instance.
88
115
* `get_user`: Use this tool to get details about a user.
89
116
* `list_instances`: Use this tool to list instances in a given project and location.
90
117
* `list_users`: Use this tool to list users in a given project and location.
@@ -96,7 +123,10 @@ Interact with Cloud SQL for SQL Server using natural language:
96
123
97
124
## Additional Extensions
98
125
99
-
Find additional extensions to support your entire software development lifecycle at [github.com/gemini-cli-extensions](https://github.com/gemini-cli-extensions).
126
+
Find additional extensions to support your entire software development lifecycle at [github.com/gemini-cli-extensions](https://github.com/gemini-cli-extensions), including:
127
+
*[Generic SQL Server extension](https://github.com/gemini-cli-extensions/sql-server)
128
+
*[Cloud SQL for SQL Server Observability extension](https://github.com/gemini-cli-extensions/cloud-sql-sqlserver-observability)
0 commit comments