Search code examples
google-cloud-platformgoogle-cloud-spanner

How to rename a database in Spanner


How can I rename a database instance in Spanner?

I've tried:

  • Google Cloud Platform console
  • Spanner API

Thanks


Solution

  • Unfortunately, it is not possible to change the name of a database after you have created it. The documentation can be found here: https://cloud.google.com/spanner/docs/data-definition-language#database_statements

    And it is clear when it comes to renaming a database:

    Cannot be changed after you create it.