Spanner documentation

Spanner is a fully managed, mission-critical database service that brings together relational, graph, key-value, and search. It offers transactional consistency at global scale, automatic, synchronous replication for high availability, and support for two SQL dialects: GoogleSQL (ANSI 2011 with extensions) and PostgreSQL.

Not sure what database option is right for you? Learn more about our database services.

  • Get access to Gemini 2.0 Flash Thinking
  • Free monthly usage of popular products, including AI APIs and BigQuery
  • No automatic charges, no commitment
View free product offers

Keep exploring with 20+ always-free products

Access 20+ free products for common use cases, including AI APIs, VMs, data warehouses, and more.

Explore self-paced training from Google Cloud Skills Boost, use cases, reference architectures, and code samples with examples of how to use and connect Google Cloud services.
training
Training and tutorials

These lectures, demos, and hands-on labs give you an overview of Google Cloud products and services so that you can learn the value of Google Cloud and how to incorporate cloud-based solutions into your business strategies.

training
Training and tutorials

This course features a combination of lectures, design activities, and hands-on labs to show you how to use proven design patterns on Google Cloud to build highly reliable and efficient solutions and operate deployments that are highly available and cost-effective.

training
Training and tutorials

Learn how to connect to Cloud SQL from Cloud Run

use case
Use cases

Discusses how to use Google Cloud to architect for disaster recovery (DR) to meet location-specific requirements.

Disaster Recovery

use case
Use cases

Demonstrates migrating a MySQL database to Spanner using Striim.

Replication Migration

use case
Use cases

Introduces concepts, principles, terminology, and architecture of near-zero downtime database migrations to Google Cloud.

Migration

use case
Use cases

Shows how to use the commit timestamp feature to track the date and time when changes are made to your database records.

Java Changes

use case
Use cases

Describes best practices for using Spanner as the primary backend database for game state storage.

Shards Gaming

code sample
Code Samples

First steps using Spanner with Python

code sample
Code Samples

First steps using Spanner with Nde.js

code sample
Code Samples

First steps using Spanner with Java

code sample
Code Samples

First steps using Spanner with PHP

code sample
Code Samples

First steps using Spanner with C#

code sample
Code Samples

First steps using Spanner with Ruby

code sample
Code Samples

First steps using Spanner with C++

Related videos