Migrating Oracle 12c On-Premises to AWS Cloud Oracle 19c
Introduction:
Migrating Oracle databases from on-premises environments to the AWS Cloud can be a complex but rewarding endeavor. In this comprehensive guide, we will outline the technical steps involved in migrating an Oracle 12c database to AWS Cloud using Oracle 19c as the target version.
Technical Steps:
1. Assessment and Planning:
- Evaluate the current Oracle 12c database using Oracle SQL Developer or SQL*Plus.
- Utilize the Oracle Database Pre-Upgrade Information Tool (utlu121s.sql) to identify compatibility issues.
- Plan the migration strategy, including instance type, storage options, and AWS region selection.
2. AWS Infrastructure Setup:
- Access the AWS Management Console and navigate to the EC2 dashboard.
- Click on "Launch Instance" to start the instance creation process.
- Choose the appropriate Amazon Machine Image (AMI) for Oracle Database 19c.
- Configure the instance details, including instance type, network settings, and storage options.
- Create a new security group allowing inbound connections on port 1521 for Oracle listener and port 22 for SSH.
- Launch the EC2 instance and wait for it to become available.
- Navigate to the Amazon EC2 dashboard and click on "Volumes" to create an Amazon EBS volume for database storage.
- Attach the EBS volume to the newly created EC2 instance.
3. Database Preparations:
- Connect to the Oracle 12c database using SQL*Plus or SQL Developer.
- Execute the following command to perform a full database backup using Oracle Recovery Manager (RMAN):
RMAN> backup database plus archivelog;
```
- Export the database schemas or tablespaces using Data Pump with the following command:
Recommended by LinkedIn
expdp SYSTEM/password@source_db schemas=SCOTT directory=dpump_dir dumpfile=scott.dmp logfile=expdp.log
4. AWS Database Setup:
- Connect to the Oracle 19c EC2 instance via SSH using the following command:
ssh -i key.pem ec2-user@<instance_ip>
- Install the Oracle Database 19c software on the EC2 instance.
- Configure the Oracle environment variables by executing the following commands:
export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1
export ORACLE_SID=ORCL
```
5. Data Migration:
- Transfer the exported data dump files from the on-premises environment to the Oracle 19c EC2 instance using SCP.
- Import the data into the Oracle 19c database using Data Pump Import.
6. Post-Migration Tasks:
- Update the tnsnames.ora file on client machines to point to the new Oracle 19c database.
- Test connectivity and functionality of the migrated database using SQL*Plus or SQL Developer.
- Configure automatic backups using Oracle Recovery Manager (RMAN) or AWS Backup.
- For Performance Tuning:
- Access the Oracle Enterprise Manager (OEM) console by navigating to https://<EC2_Instance_IP>:5500/em.
- Implement performance tuning recommendations based on OEM advisor recommendations.
- Monitor database performance metrics using OEM or CloudWatch.