Migrating From Oracle OLTP System to Cloud Spanner


Of your peers have already read this article.

8:30 Minutes

The most insightful time you'll spend today!

Find out how to migrate your database from Oracle Online Transaction Processing (OLTP) systems to Cloud Spanner.

Spanner uses certain concepts differently from other enterprise database management tools, so you might need to adjust your application to take full advantage of its capabilities. You might also need to supplement Spanner with other services from Google Cloud to meet your needs.

Migration constraints

When you migrate your application to Spanner, you must take into account the different features available. You probably need to redesign your application architecture to fit with Spanner’s feature set and to integrate with additional Google Cloud services.

Stored procedures and triggers

Spanner does not support running user code in the database level, so as part of the migration, you must move business logic implemented by database-level stored procedures and triggers into the application.


Spanner does not implement a sequence generator, and as explained below, using monotonically increasing numbers as primary keys is an anti-pattern in Spanner. An alternative way to generate a unique primary key is to use a random UUID.

If sequences are required for external reasons, then you must implement them in the application layer.

Access controls

Spanner supports only database-level access controls using IAM access permissions and roles. Predefined roles can give read-write or read-only access to the database.

If you require finer grained permissions, you must implement them at the application layer. In a normal scenario, only the application should be allowed to read and write to the database.

If you need to expose your database to users for reporting, and want to use fine-grained security permissions (such as table- and view-level permissions), you should export your database to BigQuery.

Read the full article for more, including

  • Data validation constraints
  • Supported data types
  • Migration process
  • Transferring your data from Oracle to Spanner
  • Maintaining consistency between both databases
  • Verifying data consistency
  • and more.

More Relevant Stories for Your Company

Case Study

BURGER KING Germany: Serving Up Marketing Insights and Supply Chain Visibility Easily

Do hamburgers really come from Hamburg? This may still be a matter of debate, but the popularity of American-style burger joints not just in Hamburg but all over Germany, is clear. Germany’s top two fast food companies are both burger chains. One of them is BURGER KING®, a global brand that welcomes more

Research Reports

Is it Cheaper to Run Oracle Workloads on Google Cloud Than On-Prem? Yes, By 78%

On-premises relational database management systems (RDBMS) are the traditional heart of many core business operations, but cloud-based relational databases provide the agility and scalability of the cloud while eliminating many of the onerous tasks associated with maintaining your own infrastructure. To find out how much more value cloud-based relational databases


Why More DB Admins Love Google Cloud Spanner, Its Best Uses Cases—and What it Costs

Cloud Spanner is the first scalable, enterprise-grade, globally-distributed, and strongly consistent database service built for the cloud specifically to combine the benefits of relational database structure with non-relational horizontal scale. This combination delivers high-performance transactions and strong consistency across rows, regions, and continents with an industry-leading 99.999% availability SLA, no

Research Reports

Google Leads the Pack in Big Data NoSQL Market: Forrester Research

NoSQL has become critical for all businesses to support modern business applications. It has gone from supporting simple schemaless apps to becoming a mission-critical data platform for large Fortune 1000 companies. It has already disrupted the database market, which was dominated for decades by relational database vendors. Today, half of