Note:
- This tutorial requires access to Oracle Cloud. To sign up for a free account, see Get started with Oracle Cloud Infrastructure Free Tier.
- It uses example values for Oracle Cloud Infrastructure credentials, tenancy, and compartments. When completing your lab, substitute these values with ones specific to your cloud environment.
Migrate Data to Oracle Database@Google Cloud using Oracle Data Pump
Introduction
Oracle Database@Google Cloud is an Oracle Cloud Database service that runs Oracle Database workloads in your Google Cloud environment. Built on Oracle’s best database services like Oracle Exadata Database Service and Oracle Autonomous Database, you can quickly develop and modernize applications with capabilities such as Oracle Database 23ai AI Vector Search and Google Vertex AI.
With native integration, you can deploy your Oracle database services in a Google Cloud data center running on Oracle Cloud Infrastructure (OCI) Exadata hardware with minimal latency. Workloads reside in Google Cloud and the Exadata systems used by both services are deployed in Google Cloud data centers. You get the best from Oracle and Google Cloud – which includes the performance and monitoring tools, developer tools, analytics, etc.
Oracle Data Pump offers very fast bulk data and metadata movement between user managed Oracle databases and Oracle Autonomous Database.
Oracle Data Pump Import lets you import data from Oracle Data Pump files residing in OCI Object Storage. You can save your data to your Google Cloud Storage bucket and use Oracle Data Pump to load data to Oracle Autonomous Database.
This tutorial walks you through the steps to migrate a sample application schema using Oracle Data Pump Import into your Oracle Database@Google Cloud.
Objectives
As a database admin or user:
-
Upload an Oracle Data Pump dump file to Google Cloud Storage bucket.
-
Get the access key to allow Oracle Autonomous Database to connect to the Google Cloud Storage bucket.
-
Install Oracle SQL Developer Command Line (SQLcl) and connect to Oracle Autonomous Database.
-
Use the sample
.dmp
file to import data to your Oracle Autonomous Database.
Prerequisites
-
Access to a pre-provisioned Oracle Autonomous Database instance.
-
The Google Cloud Compute Engine virtual machine (VM) instance.
Task 1: Generate Access Key for your User Account
-
Log in to the Google Cloud Console, go to Cloud Storage and click Settings.
-
In the Settings page, click INTEROPERABILITY. Under Access keys for your user account, click CREATE A KEY.
Note down the Access key and Secret.
Task 2: Upload the Dump File to Google Cloud Storage Bucket
In this task, upload the database export dump file for the schema that you want to migrate to Oracle Database@Google Cloud to a Google Cloud Storage bucket. If you do not have a dump file at this point and are testing out a migration you can download the dump file from here: HR.dmp.
-
Go to the Google Cloud Console, navigate to Cloud Storage, Buckets and click CREATE to create a Google Cloud Storage bucket. For this example, we will name the bucket
gcpdatapump
. -
Click the
gcpdatapump
bucket and upload the dump file.
Task 3: Set up User Credentials in your Target Oracle Autonomous Database
Now, we have the access key and the secret, let us set up the target database to read from the Google Cloud Storage and import data.
Here, we will use SQLcl to demonstrate the steps needed to set up Google Cloud Storage credentials.
-
Download and install SQLcl on the Google Cloud Compute Engine VM instance from here: sqlcl-24.3.2.330.1718.zip.
-
Run the following command to unzip the file.
wget https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-24.3.2.330.1718.zip unzip sqlcl-24.3.2.330.1718.zip
-
In the Google Cloud Console, go to the Autonomous Database page and click the autonomous database that was provisioned.
-
Go to Autonomous Database Details page, click CONNECTIONS and note down the TNS name and Connection string.
-
Create a file named
tnsnames.ora
undersqlcl/bin
and set theTNS_ADMIN
variable to current working directory. Connect to the Oracle Autonomous Database using the connection string or by setting up thetnsnames
path.-
Set up
tnsnames
path and connect to the database.cd sqlcl/bin $ cat tnsnames.ora adbgcp_high=(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=mahfgbhj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=gd443790554e91c_adbgcp_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no))) $ export TNS_ADMIN=`pwd` ./sqlcl admin@adbgcp_high
Or
-
Set up by using connection string.
cd sqlcl/bin ./sqlcl admin@"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=mahfgbhj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=gd443790554e91c_adbgcp_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))"
-
-
Once connected to your autonomous database as admin user, run the following PL/SQL procedure, replacing the
username
with Access key andpassword
with Secret.set define off begin DBMS_CLOUD.CREATE_CREDENTIAL( credential_name => 'GOOGLE_CRED_NAME', username => 'Access_key', password => 'Secret' ); END; /
Ensure the PL/SQL procedure is executed successfully from the log message.
-
Run the following query to test the access to Google Cloud Storage.
SELECT * FROM DBMS_CLOUD.LIST_OBJECTS('GOOGLE_CRED_NAME', 'https://gcpdatapump.storage.googleapis.com/');
Task 4: Import Data from Google Cloud Storage Bucket using impdp
Utility
In the same SQLcl window, run the following data pump import command.
datapump import -
-schemas HR -
-excludeexpr "IN ('PROCEDURE', 'PACKAGE')" -
-directory data_pump_dir -
-credential GOOGLE_CRED_NAME -
-remaptablespaces USERS=DATA -
-dumpuri https://gcpdatapump.storage.googleapis.com/HR.dmp -
-logfile testuser1.log
Now, your application schema is successfully imported.
Next Steps
When you implement this solution, you deploy resources in two cloud environments: database resources are in Google Cloud, while the database administration control plane is in Oracle Cloud Infrastructure (OCI). This lets you deploy Oracle Database products in your Google Cloud environment while OCI maintains the administration capabilities.
Oracle Data Pump can be used to migrate your data from on-premises or other cloud providers to Oracle Database@Google Cloud. Along with Oracle Data Pump, Oracle Zero Downtime Migration can also be used to migrate data to Oracle Database@Google Cloud.
Acknowledgements
- Author - Vivek Verma (Master Principal Cloud Architect, North America Cloud Engineering)
More Learning Resources
Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.
For product documentation, visit Oracle Help Center.
Migrate Data to Oracle Database@Google Cloud using Oracle Data Pump
G28328-01
Copyright ©2025, Oracle and/or its affiliates.