Migration Approach
Migrating Oracle Database from AWS to Oracle Cloud Infrastructure (OCI) Exadata Cloud Service (ExaCS) involves careful planning and execution to ensure a smooth transition. In this blog post, we will discuss the migration approach, detailing the steps involved in moving from an AWS Oracle Database to OCI ExaCS.
The chosen migration approach involves creating a secondary physical standby database on OCI staging, using Pluggable Database (PDB) cloning via Database Link for the cutover. Here is an overview of the steps:

AWS Source Configuration:
Stop the observer and disable Fast-Start Failover.
DGMGRL> STOP OBSERVER;
DGMGRL> disable fast_start failover;
Verify the ASM disk group names.
SELECT name FROM v$asm_diskgroup;
OCI Staging Database:
Create an empty CDB database using OCI Console with the same name as the AWS source database.
Configure a static listener and reload the listener for the CDB database.
-- Modify listener.ora and tnsnames.ora files
srvctl modify listener -l listener_name -f new_listener.ora
srvctl reload listener -l listener_name
AWS-OCI Connectivity:
Share the TNSNames file information between AWS and OCI servers.
RMAN Duplicate Process:
*.db_file_name_convert='+DATA1','+DATAC1'
*.log_file_name_convert='+DATA1','+DATAC1','+RECO1','+RECOC1'
*.enable_pluggable_database=true
*.standby_file_management=auto
Bring the database in nomount using modified pfile
once database is up & running.
create spfile with pfile! restart the database.
Start database nomount using spfile.
Test the rman connection test using below
rman target sys/pass@dbadeeds_AWS auxiliary sys/passsp_1@dbadeeds_OCI
Create Duplicate rman_duplicate.cmd
run {
allocate channel prmy1 type disk;
allocate channel prmy2 type disk;
allocate channel prmy3 type disk;
allocate channel prmy4 type disk;
allocate channel prmy5 type disk;
allocate channel prmy6 type disk;
allocate channel prmy7 type disk;
allocate channel prmy8 type disk;
allocate auxiliary channel stby type disk;
allocate auxiliary channel stby2 type disk;
allocate auxiliary channel stby3 type disk;
allocate auxiliary channel stby4 type disk;
allocate auxiliary channel stby5 type disk;
allocate auxiliary channel stby6 type disk;
allocate auxiliary channel stby7 type disk;
allocate auxiliary channel stby8 type disk;
duplicate target database for standby from active database nofilenamecheck SECTION SIZE 250G;;
}
[oracle@ash1aeac0101p-ytvbf1 snarani]$ rman target sys/pass@dbadeeds_AWS auxiliary sys/passsp_1@dbadeeds_OCI
Recovery Manager: Release 19.0.0.0.0 - Production on Mon Aug 7 16:58:02 2023
Version 19.20.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
PL/SQL package SYS.DBMS_BACKUP_RESTORE version 19.16.00.00 in TARGET database is not current
PL/SQL package SYS.DBMS_RCVMAN version 19.16.00.00 in TARGET database is not current
connected to target database: DBADEEDSP (DBID=3462901754)
connected to auxiliary database: DBADEEDSP (not mounted)
nohup rman target sys/pass@dbadeeds_AWS auxiliary sys/passsp_1@dbadeeds_OCI cmdfile=rman_dup.cmd log=rman_duplicate.log &
Monitoring the duplicate process and save the log file.
Once Successful RMAN Duplicate process please find the logfile for controlfile name and check that file in srvctl config database
Example:
srvctl modify database -d dbadeeds_OCI-spfile +DATAC1/DBADEEDSOCISB/PARAMETERFILE/spfile.600.1144269343
Spfile: +DATAC1/DBADEEDSOCISB/PARAMETERFILE/spfile.600.1144268239
AWS Source :
Update the below parameters to enable the replication
ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(dbadeedsawsb2,dbadeedsawssb,dbadeedsoci)' scope=both sid='*';
alter system set log_archive_dest_3='service=DBADEEDSOCISBdelay=0 optional compression=disable LGWR async valid_for=(online_logfiles,primary_role) net_timeout=30 db_unique_name=dbadeedsoci' scope=both sid='*';
OCI Staging Database:
Update replicating parameter
ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(dbadeedsawsb2,dbadeedsawssb)' scope=both sid='*';
alter system set fal_server=ceaa010paws scope=both sid='*';
Once cluster is updated with new spfile, using below command in one node.
Please change database role in cluster to standby, as while creating from console the db created as normal read-write db.
srvctl modify database -d dbadeedsoci-s "read only" -r PHYSICAL_STANDBY
Modify the cluster_database = TRUE using sqlplus
Once Db is updated in cluster, start the database using srvctl.
Srvctl stop database -d dbadeedsoci
Srvctl start database -d dbadeedsoci (This command will start db in 2 nodes)
Start the replication:
please start mrp from any of one node and very replication is working fine or not.
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT from session nodelay;
Check the DG Lag → Verify Lag between Primary & standby's.
Cutover Day - Before Handover:
1. Create a clone user on the AWS source database.
2. Update parameters on the OCI target standby.
3. Cutover Day - After Handover:
4. Apply data patches to avoid PDB violations.
5. Encrypt tablespaces on the source database.
6. Start replication on the OCI staging database.
7.Services Configuration:
8.Create services for the pluggable database on the OCI target.
9.Start the services and verify their status.
10. Provide details such as the new hostname, service name, and port.
Follow this document for Oracle PDB Cloning
Conclusion
Migrating Oracle Database from AWS to OCI ExaCS is a complex but achievable process. By carefully following the steps outlined in this guide, organizations can ensure a successful migration with minimal downtime. Always conduct thorough testing and have a rollback plan in place to address any unexpected issues during the migration process.
Remember, each migration may have unique requirements, so adapt these steps based on your specific environment and needs
Leave a comment