Using Console
Using CLI
[INSTANCE_NAME]
with the name of the SQL instance that needs to be updated, and [LATEST_VERSION]
with the latest version of the SQL database engine.
For example, if the SQL instance name is my-sql-instance
and the latest version is SQLSERVER_2019_STANDARD
, the command would be:
[INSTANCE_NAME]
with the name of the SQL instance.
Check the databaseVersion
field to ensure that it reflects the latest version of the SQL database engine.
That’s it! The SQL instance has now been updated to the latest version.
Using Python
google-cloud-sql
Python library to get a list of all the SQL instances in your GCP project.
get
method of the Instance
class in the google-cloud-sql
library. You can compare the version of each instance with the latest version available and identify the instances that are not configured with the latest version.
patch
method of the Instance
class in the google-cloud-sql
library. You can set the database_version
parameter to the latest version available for the SQL instance.
<your-project-id>
and <path-to-service-account-key-file>
with your actual GCP project ID and the path to your service account key file, respectively. Also, you need to update the database_version
parameter in the patch
method with the latest version available for your SQL instance.