Database migration involves moving the data contained in the database—including schema objects (tables, indexes, views), stored procedures, functions, and triggers—from an existing database to a new or updated database.
You may want to migrate your databases for a variety of reasons, such as improving performance, reducing costs, strengthening security, or adopting technologies such as analytics or AI.
Ready to get started? Learn about Database Migration Service and migrate your database to Google Cloud.
Data migration is a component of the database migration process—moving data from one environment to another. You may need to move your data without migrating your database, such as in the case of making storage-related changes.
The key to successful data and database migration is to transfer your information accurately and quickly, while minimizing downtime and disruption during the transfer and during the cutover.
A database engine, also called a database management system (DBMS), is the software that manages basic database operations and interfaces with software applications.
A homogeneous migration is when the database you’re moving from (source) has an identical or very similar engine to the database you’re moving to (target). A heterogeneous migration describes when the target database engine differs significantly from the source.
The complexity of a migration varies in large part based on the differences between the source and target databases. A heterogeneous migration will require schema and code conversion—rewriting them into the target database language. For managing the complexities of migrations, such as managing application code written for the source database that needs conversion, a database migration service can help.
Many companies are willing to invest in a long or complicated database migration project in order to reap the long-term gains that come with a modern database engine.
There are 4 common strategies for migrating data. Visit cloud migration strategies for a deep dive and recommended strategies.
While you can migrate your database between virtually any two locations, the majority of migrations are either from on-premises to cloud or from one cloud to another.
There are many reasons why companies are migrating to the cloud (or to an alternate cloud provider):
Learn more about the benefits of migrating to the cloud.
Ideally, database migration isn’t a process your company will do often. To make the most of your migration, here are a few key questions to think about:
Data and database migrations can be complex. It is essential to ensure that your enterprise’s data, as well as its organization and functions, move to the new architecture seamlessly. If done improperly, you may experience data loss, workloads not running properly, or security issues.
Some best practices:
Considerations:
The number of phases your migration will take depends on your organization’s existing setup and timeline. For example, migrating from a self-managed, on-premises deployment to a managed cloud service can be accomplished in a single step. Or, if there is time pressure, you can first migrate to a self-managed database in the cloud, and then switch to a fully managed solution.
If it’s a heterogeneous database migration, consider whether to combine the conversion with one of these steps or convert later.
For an in-depth look into the process, read concepts and principles of data migration and setting up and executing the data migration process.
Although the details will vary based on your specific business case, these are the basic steps of a successful migration:
After you migrate your database, you’ll want to continue to optimize to maintain the best performance. Consider a fully managed database service.
Many organizations are moving their on-premises workloads to the cloud for the reasons discussed above. Migrations from on-premises require additional considerations compared to cloud-to-cloud migrations.
A common strategy to migrate on-premises workloads is rehosting, which copies your entire workload over to the cloud. Doing this reaps the security, reliability, and some cost benefits associated with cloud migration. However, this strategy also transfers any existing inefficiencies from the on-premises architecture over to the cloud infrastructure. Therefore, this strategy causes you to miss out on the larger cost savings and efficiencies associated with a cloud-native architecture. You may also miss the rich functionality of the cloud in areas like disaster recovery, analytics integration, AI/ML services, and a marketplace of partner offerings.
Make sure to maintain the security of your data during the migration, particularly between different types of environments. One way to ensure the best security is to use a trusted database migration service.
It can take anywhere from a few days to several months, so it’s important to plan. Factors include the size of your database, your migration strategy, and whether you’re using a database migration service.
Database migration is more than just moving the data, it’s preserving the functions so that your workloads run without a hitch on your new system. How you migrate will depend on the code you’ve written and your migration tools.
Benefits of a database migration service include:
And as generative AI becomes more essential to enterprise workloads, AI-powered conversion between database engines, using large language models (LLMs) such as Gemini, is being offered by cloud providers.
Check with your chosen cloud provider to see if they offer a database migration service.
Start building on Google Cloud with $300 in free credits and 20+ always free products.