Minimal downtime migrations for Oracle
Spanner migration tool can be used to perform minimal downtime migration for Oracle using the GUI or the CLI.
Following instructions assume you have setup SMT by following the instructions in the installation guide.
Table of contents
Before attempting a minimal downtime migration, ensure you have added the necessary permissions required in the GCP account. This is documented here.
Source database configuration
Allow Datastream to connect to Oracle database
Spanner migration tool currently supports creating connection profiles via the IP whitelisting route only.
Follow the Datastream guidelines to allowlist datastream to access the source database.
Configure Oracle database for CDC
Follow the guidelines for configuring Oracle here.
It is often a good idea to create a connection profile and a Datastream stream directly via the GCP console to ensure that permissions and connectivity are correctly configured before proceeding with using SMT for a minimal downtime migration. This can be done by following the Datastream documentation.
CLI
To run a minimal downtime schema and data migration:
$ ./spanner-migration-tool schema-and-data --source=oracle \
--source-profile='host=host,port=1521,user=user,password=pwd,dbN\
ame=db,streamingCfg=streaming.json' \
--target-profile='project=spanner-project,instance=spanner-insta\
nce'
UI
Follow the steps below to configure a minimal downtime migration are Oracle:
- Connect to source database.
- Connect to spanner instance.
- Convert Oracle schema to Spanner schema using the schema conversion workspace. Follow the documentation in the schema conversion workspace section of the documentation for different schema modifications that are supported by SMT. For guidance on specific data type conversion for Oracle, look at the data conversion for Oracle documentation.
- Configure datastream and dataflow details.
- Wait for the migration to be orchestrated by SMT.
- Look at the list of generated resources for links to the Datastream stream and the Dataflow job crearted.