Upgrade an instance to Cloud SQL Enterprise Plus edition by using in-place upgrade

MySQL  |  PostgreSQL  |  SQL Server


Note: This page contains features related to Cloud SQL editions. For more information about Cloud SQL editions, seeIntroduction to Cloud SQL editions.

This page shows you how to use the in-place upgrade method to upgrade a Cloud SQL Enterprise editioninstance to Cloud SQL Enterprise Plus edition. Additionally, it also describes the procedure toswitch a Cloud SQL Enterprise Plus edition instance to Cloud SQL Enterprise edition.

Upgrading to Cloud SQL Enterprise Plus edition provides you with several benefits and performance enhancements.For more information, seeIntroduction to Cloud SQL for SQL Server editions.

To enable these enhancements for your existing Cloud SQL Enterprise edition instances, you must upgradethem to Cloud SQL Enterprise Plus edition. The upgrade process takes a few minutes to complete

Additionally, this upgrade process doesn't require you to change the endpointsthat your applications connect to.

Before you begin

  • Ensure that you're running a Cloud SQL Enterprise edition instance on SQL Server Enterprise 2019 or SQL Server Enterprise 2022.

    Note: If you set themax server memory (mb) flag, then we suggest removing the flag after you upgrade your instance to Cloud SQL Enterprise Plus edition. This way, Cloud SQL can manage the value for the flag automatically. However, if you prefer to set the value, you can revisit the flag value after you upgrade your instance and adjust the value according to the size of the VM.
  • Ensure that your network project is created after August 2021 or is fullyupgraded to the new network architecture.

Upgrade an instance to Cloud SQL Enterprise Plus edition

Use the procedure in this section to upgrade a Cloud SQL Enterprise edition instanceto Cloud SQL Enterprise Plus edition.

Console

  1. In the Google Cloud console, go to theCloud SQL Instances page.

    Go to Cloud SQL Instances

  2. To open theOverview page of an instance, click the instance name.
  3. ClickEdit.
  4. In theChoose a Cloud SQL edition section, clickUpgrade.
  5. In theUpgrade to Enterprise Plus panel, enter your instance ID and then clickUpgrade edition.

Alternatively, you can also upgrade an instance by clickingUpgrade in theConfiguration section of the instanceOverview page.

gcloud

The following code sample shows how to upgrade your instance to Cloud SQL Enterprise Plus edition:

gcloudsqlinstancespatchINSTANCE_ID\--edition=enterprise-plus\--tier=MACHINE_TYPE\--project=PROJECT_ID

Replace the following:

  • PROJECT_ID: the project ID of the instance that you want to upgrade.
  • INSTANCE_ID: name of the instance that you want to upgrade.
  • MACHINE_TYPE: the machine type of the instance that you want to upgrade to. For more information about machine types for Cloud SQL Enterprise Plus edition, seeMachine types for Cloud SQL Enterprise Plus edition instances.

REST

The following command upgrades your instance to Cloud SQL Enterprise edition and triggers a restart operation.

Before using any of the request data, make the following replacements:

  • PROJECT_ID: the project ID of the instance that you want to upgrade.
  • INSTANCE_ID: the instance ID of the instance that you want to upgrade.
  • MACHINE_TYPE: the machine type of the instance that you want to upgrade to. For more information about machine types for Cloud SQL Enterprise Plus edition, seeMachine types for Cloud SQL Enterprise Plus edition instances.

HTTP method and URL:

PATCH https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances/INSTANCE_ID

Request JSON body:

{  "settings": {      "tier": "MACHINE_TYPE",      "edition": "ENTERPRISE_PLUS",      "dataCacheConfig": {        "dataCacheEnabled": true      },  }}

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances/INSTANCE_ID"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances/INSTANCE_ID" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

{  "kind": "sql#operation",  "targetLink": "https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances/INSTANCE_ID",  "status": "PENDING",  "user": "user@example.com",  "insertTime": "2020-01-16T02:32:12.281Z",  "operationType": "UPDATE",  "name": "OPERATION_ID",  "targetId": "INSTANCE_ID",  "selfLink": "https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/operations/OPERATION_ID",  "targetProject": "PROJECT_ID"}

REST v1beta4

The following command upgrades your instance to Cloud SQL Enterprise edition and triggers a restart operation.

Before using any of the request data, make the following replacements:

  • PROJECT_ID: the project ID of the instance that you want to upgrade.
  • INSTANCE_ID: the instance ID of the instance that you want to upgrade.
  • MACHINE_TYPE: the machine type of the instance that you want to upgrade to. For more information about machine types for Cloud SQL Enterprise Plus edition, seeMachine types for Cloud SQL Enterprise Plus edition instances.

HTTP method and URL:

PATCH https://sqladmin.googleapis.com/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID

Request JSON body:

{  "settings": {      "tier": "MACHINE_TYPE",      "edition": "ENTERPRISE_PLUS",      "dataCacheConfig": {        "dataCacheEnabled": true      },  }}

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://sqladmin.googleapis.com/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://sqladmin.googleapis.com/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

{  "kind": "sql#operation",  "targetLink": "https://sqladmin.googleapis.com/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID",  "status": "PENDING",  "user": "user@example.com",  "insertTime": "2020-01-16T02:32:12.281Z",  "operationType": "UPDATE",  "name": "OPERATION_ID",  "targetId": "INSTANCE_ID",  "selfLink": "https://sqladmin.googleapis.com/v1beta4/projects/PROJECT_ID/operations/OPERATION_ID",  "targetProject": "PROJECT_ID"}

Change to Cloud SQL Enterprise edition

Note: Cloud SQL disables the data cache automatically when you change aninstance from Cloud SQL Enterprise Plus edition to Cloud SQL Enterprise edition.

Console

  1. In the Google Cloud console, go to theCloud SQL Instances page.

    Go to Cloud SQL Instances

  2. To open theOverview page of an instance, click the instance name.
  3. ClickEdit.
  4. In theChoose a Cloud SQL edition section, clickSwitch to Enterprise.
  5. In theSwitch to Enterprise panel, enter your instance ID and then clickSwitch edition.

Alternatively, you can also change to Cloud SQL Enterprise edition by clickingSwitch to Enterprise inConfiguration sectionof the instanceOverview page.

gcloud

The following code sample shows how to change your instance to Cloud SQL Enterprise edition:

gcloudsqlinstancespatchINSTANCE_ID\--edition=enterprise\--tier=MACHINE_TYPE\--project=PROJECT_ID
Replace the following:
  • PROJECT_ID: the project ID of the instance.
  • INSTANCE_ID: name of the instance.
  • MACHINE_TYPE: the machine type of the instance that you want to switch to. For more information about machine types for Cloud SQL Enterprise edition, seeMachine types for Cloud SQL Enterprise edition instances.

REST

The following command changes your instance to Cloud SQL Enterprise edition and triggers a restart operation.

Before using any of the request data, make the following replacements:

  • PROJECT_ID: the project ID of the instance.
  • INSTANCE_ID: the instance ID of the instance.
  • MACHINE_TYPE: the machine type of the instance that you want to switch to. For more information about machine types for Cloud SQL Enterprise edition, seeMachine types for Cloud SQL Enterprise edition instances.

HTTP method and URL:

PATCH https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances/INSTANCE_ID

Request JSON body:

{  "settings": {      "tier": "MACHINE_TYPE",      "edition": "ENTERPRISE"  }}

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances/INSTANCE_ID"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances/INSTANCE_ID" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

{  "kind": "sql#operation",  "targetLink": "https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/instances/INSTANCE_ID",  "status": "PENDING",  "user": "user@example.com",  "insertTime": "2020-01-16T02:32:12.281Z",  "operationType": "UPDATE",  "name": "OPERATION_ID",  "targetId": "INSTANCE_ID",  "selfLink": "https://sqladmin.googleapis.com/v1/projects/PROJECT_ID/operations/OPERATION_ID",  "targetProject": "PROJECT_ID"}

REST v1beta4

The following command changes your instance to Cloud SQL Enterprise edition and triggers a restart operation.

Before using any of the request data, make the following replacements:

  • PROJECT_ID: the project ID of the instance.
  • INSTANCE_ID: the instance ID of the instance.
  • MACHINE_TYPE: the machine type of the instance that you want to switch to. For more information about machine types for Cloud SQL Enterprise edition, seeMachine types for Cloud SQL Enterprise edition instances.

HTTP method and URL:

PATCH https://sqladmin.googleapis.com/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID

Request JSON body:

{  "settings": {      "tier": "MACHINE_TYPE",      "edition": "ENTERPRISE"  }}

To send your request, expand one of these options:

curl (Linux, macOS, or Cloud Shell)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://sqladmin.googleapis.com/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID"

PowerShell (Windows)

Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.

Save the request body in a file namedrequest.json, and execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://sqladmin.googleapis.com/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

{  "kind": "sql#operation",  "targetLink": "https://sqladmin.googleapis.com/v1beta4/projects/PROJECT_ID/instances/INSTANCE_ID",  "status": "PENDING",  "user": "user@example.com",  "insertTime": "2020-01-16T02:32:12.281Z",  "operationType": "UPDATE",  "name": "OPERATION_ID",  "targetId": "INSTANCE_ID",  "selfLink": "https://sqladmin.googleapis.com/v1beta4/projects/PROJECT_ID/operations/OPERATION_ID",  "targetProject": "PROJECT_ID"}

Generate the write endpoint automatically

Awrite endpoint is a global domain name service (DNS) name that resolves tothe IP address of the current primary Cloud SQL instance automatically.This endpoint redirects incoming connections to the new primary instanceautomatically in case of a replicafailover operation.You can use the write endpoint in a SQLconnection string instead of an IP address. By using a write endpoint, you canavoid having to make application connection changes when a region outage occurs.

If youenable the DNS API for yourGoogle Cloud project and upgrade your instance that has a private IP address on the new networkarchitecture to Cloud SQL Enterprise Plus edition, then Cloud SQL generates the write endpointautomatically for you. However, theserver certificate that's associated withthe instance won't have the write endpoint (global DNS name) added to it. Therefore, if you want toverify the DNS name, then you mustrotate the certificate. After the rotation of this certificateis complete, Cloud SQL adds the DNS name to the certificate. You canuse the DNS name for server identity verification.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-17 UTC.