Migrating Oracle Database From AWS RDS To Oracle Cloud Infrastructure
Nowadays, proper data management is crucial for any business. We have numerous cloud service providers for storage and securing databases. If your Oracle database is deployed in a cloud AWS environment like RDS or EC2, then a move to Oracle Cloud Infrastructure (OCI) can be rewarding. You can benefit from enhanced control, performance, cost-savings, and elasticity. OCI offers unparalleled performance for cloud native and enterprise IT workloads. There are several methods of database migration from AWS RDS to OCI. One has to examine their requirements thoroughly before selecting a method to migrate.
Oracle database developers use Oracle Data Pump Utility, which is an enhanced version of Oracle to export & import utilities. It offers advantages like enhanced security and speed. Overall, if your database is at least 5 TB in size, you can use the Oracle Data Pump Utility, which obtains the data from the source database. This procedure is useful for scalability and it stores the data in the form of platform-independent export files. You can move them to your target by employing DBMS_FILE_TRANSFER. This launches the import process and loads data to a target database.
Now open the user interface of the SQL developer and go to View DBA. To expand your DB instance’s connection, right-click on Data Pump and select Data Pump Export Wizard.
Select the suitable export type from Database, Tablespaces, Schemas and Tables. In this example, we go with Database and export accordingly.
Go through the available source data and export accordingly. Now pass through Filter and Table Data pages with default settings to proceed to the Options menu. Here, specify the value of Thread Number on the Options page. Make sure to add the value 2 or more for parallelism. A value of 2 here means that two parallel processes read the database during the export process. Check whether your RDS database instance has enough memory, CPU, and I/O resources to compute these processes.
Select the format of the output file on the Output Files page. Here, the /rdsdbdata/datapump directory of the instance gets referred by the DATA_PUMP_DIR. After that, pass the next two screens to submit the export job. Keep a tab on the entire process of the export job.
Run the RDS_FILE_UTIL.LISTDIR package to list the DATA_PUMP_DIR files using the code as “select * from TABLE (RDSADMIN.RDS_FILE_UTIL.LISTDIR(‘DATA_PUMP_DIR’));” as shown below:
To continue, you will need a database link from the Amazon RDS source database to the OCI database.
Create database link Ora_clouddb1 connect to System identified by password using ‘(description= (address=(https_proxy=proxyhostname)(https_proxy_port=80)(protocol=tcps)(port=1522)
Read the files in the DATA_PUMP_DIR by executing dbms_file_transfer.put_file. It also moves these files to the target DB host. Use the DB link from the last step for this file transfer.
Now, you have to perform an import operation so the Data Pump files are loaded to the target database. For this you need operating-system-level access to the Database service instance on Oracle Cloud Infrastructure.
The Data Pump Import utility is started using the “impdp” command. The specified mode applies to the source of the operation, a database if the Database link parameter is specified. To run Data Pump Import with the dumpfile parameter set to the list of file URLs on your Cloud Object Storage.
impdp admin/password@ADWC1_medium \ (use your Credentials of ADW & detaisl)
directory=DATA_PUMP_DIR \ (Data Pump Directory)
credential=def_cred_name \ (Credentials stored in Cloud Object Storage)
dumpfile= https://objectstorage.us- phoenix-
bucketname/o/expdat01.dmp \ (Cloud object storage link for dmp file)
transform=dwcs_cvt_iots:y transform=constraint_use_default_index:y \
Note: There is a minor difference in this command while using the Versions 184.108.40.206 and earlier.
When the data gets imported without any issues, examine the object and record counts to verify the accuracy of the import.
Selecting this method enables parallelization, offers restart capability and allows for a logical database migration. Moreover, since it is a cloud-to-cloud migration process, you can perform it online. In case your DB is larger than 5 TB, even then you can use this method, if there is free space on the RDS instance’s file system, which is the location of the generated dumpfile related to Data Pump.
If you want zero downtime migrations, or if your database is 20 TB in size, or if you want to migrate Amazon EC2 to OCI, feel free to contact us.
Contact for further details
Bala Murali Krishna Uppalapati
Associate Team Lead – Oracle Analytics