0% found this document useful (0 votes)
24 views67 pages

Oracle On AWS RDS v6 Final PDF

The document provides a comprehensive guide on migrating Oracle databases from on-premises to AWS RDS, detailing methods such as Oracle LogMiner and the Database Migration Service (DMS). It discusses the pros and cons of using DMS, migration types, and configurations required for a successful migration. Additionally, it highlights the differences between using EC2 and RDS for Oracle databases, including support for various Oracle features and configurations.

Uploaded by

tigrislv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views67 pages

Oracle On AWS RDS v6 Final PDF

The document provides a comprehensive guide on migrating Oracle databases from on-premises to AWS RDS, detailing methods such as Oracle LogMiner and the Database Migration Service (DMS). It discusses the pros and cons of using DMS, migration types, and configurations required for a successful migration. Additionally, it highlights the differences between using EC2 and RDS for Oracle databases, including support for various Oracle features and configurations.

Uploaded by

tigrislv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

Oracle Database on Oracle

RDS AWS
- How to migrate the On-prem Oracle to AWS RDS (Oracle LogMiner)
- Pros x Cons of using DMS tool (According to my experience)

"Opinions expressed are solely my own and do not express the views or opinions of my employer."

Group Name / DOC ID / Month XX, 2017 / © 2017 IBM Corporation 1


© 2020 IBM Corporation
Bruno Reis Da Silva
- Afro-Brazilian

- Outside the coding world, loves to travel (28 countries so far) ,


learn languages, cultures and working out.

- IBM employee since June 2011 : Senior Oracle DBA & Database
Cloud Support Engineer
- IBM Brazil – 5 years | IBM Hungary / Europe – 2 years
- IBM Sweden / Europe – 1 year – onward

- Computer Scientist and 1st Oracle Ace Associate of Hungary


(October 2017, 24 years old).

- Master's candidate in the universities in Sweden

- Twitter : www.twitter.com/brunorsdba

- Blog : www.techdatabasket.com

- E-mail : [email protected]

- Oracle , IBM, OpenGroup Certified.

© 2020 IBM Corporation - Collaborator of LUXOUG and member of SWEOUG. 2


Bruno Reis Da Silva

© 2020 IBM Corporation 3


© 2020 IBM Corporation 4
http://www.oraworld.org

© 2020 IBM Corporation 5


Gen 2 Cloud Autonomous Infrastructure: Larry Ellison at Oracle OpenWorld
2019 : https://www.youtube.com/watch?v=lIgGrDQb2OQ

”For those who attended the Oracle Open World 2019 in San Francisco, California in the USA (if you didn’t check out
my compilation video about the event : https://www.youtube.com/watch?v=8bOLbXOJHmAh ) and have had the
experience to also attend the KeyNotes probably would prefer to migrate their Oracle database On-Prem to Oracle
Cloud Ed2 instead of AWS Amazon EC2 or RDS “

Group Name / DOC ID / Month XX, 2017 / © 2017 IBM Corporation 6


© 2020 IBM Corporation
As an Oracle evangelist, why would you
talk about AWS RDS?
- ”Have you ever installed an Oracle DB in Windows server? “
- Knowledge is power. More you know, more you can talk and compare.
- Oracle RDS AWS is still an Oracle database engine.
- The future is Multicloud.

Group Name / DOC ID / Month XX, 2017 / © 2017 IBM Corporation 7


© 2020 IBM Corporation
Migration types / task types :
Migrating datas only replication until start time of the task:

- Full load (migrating existing data)

There are two types of ongoing replication tasks:

- Full load plus CDC (migrating existing data and replicate ongoing changes)

- CDC only (replicate data changes only)

Group Name / DOC ID / Month XX, 2017 / © 2017 IBM Corporation 8


© 2020 IBM Corporation
Move an Oracle database from on-
prem to Oracle RDS AWS? Difference
between EC2 and RDS.
- Move your Oracle database On-Prem to Amazon AWS.

- EC2: You manage the database at AWS by yourself.


- IaaS(Infrastructure as a Service)

- RDS (RELATIONAL DATABASE SERVICE) : Database as a Service (DBaaS) that


automatically configures and maintains your databases in the AWS cloud. The user
has limited power over specific configurations .

9
© 2020 IBM
EC2
Migrating Oracle database to EC2:

- RMAN backup restore

Platform
Version

- Golden gate

EC2 Instance for Golden Gate


Zero Downtime
Cost

- Database Migration Service

Most cost effective


Zero Downtime (almost)

- Data Guard

Zero Downtime
10
© 2020 IBM
RDS
Migrating Oracle to RDS:

- Data Pump:

Cross Platform
Cross version

- Golden Gate (additional licences)

EC2 instance for replicat process


Zero Downtime
Cost

- Database Migration Service (most cost effective)

Most cost effective


Zero Downtime (almost)

11
© 2020 IBM
EC2 and RDS:
Impact on some Oracle options:

- Oracle Rac is not supported in RDS. (RAC: ACTIVE X ACTIVE, RDS: ACTIVE X
PASSIVE)
- ASM supported both EC2 and RDS.
- Multitenant is not supported in RDS just EC2.
- Data Guard is supported in RDS (Amazon RDS for Oracle Now Supports In-region
Read Replicas with Active Data Guard for Read Scalability and Availability since
March 2019) and EC2.

Also on some application:

- PeopleSoft: support EC2 and RDS;


- Siebel: support EC2 and RDS;
- JD Edwards: support EC2 and RDS;
- ISV Applications : support EC2 and RDS
- E-BUSINESS SUITE: Application that need to access the file system which is not
provided by RDS so just EC2 is supported.

12
© 2020 IBM
Amazon’s recommendation? DMS
- Data Pump:
- Several hours to export and import
- Unavailability

- Golden Gate (additional licences)


- Cost

- Database Migration Service (most cost effective)


- Most cost effective
- Zero Downtime

13
© 2020 IBM
Corporation
AWS DMS
”Migrates the database on AWS cloud with virtually no downtime. The only prerequisite is that the source or target
database is on AWS. AWS DMS is a web service that enables migrating the data you use most from open-source and
commercial databases such as Oracle, PostgreSQL, Microsoft SQL Server, Amazon Redshift, Amazon Aurora, MariaDB,
MySQL, MongoDB, and SAP ASE to AWS. AWS DMS supports homogenous database engine migrations and
heterogeneous migrations, where you can convert database engines or versions using the AWS Schema Conversion
Tool.”

Three Main Components:


1. Replication Instances
2. Endpoints
3. Replication Tasks

14
© 2020 IBM
Corporation
How to configure your Oracle
On-Prem To be migrated to AWS
RDS Oracle?

15
© 2020 IBM
How to configure your Oracle
On-Prem To be migrated to AWS
RDS Oracle?
Scripts in https://github.com/brunorsreis/migonpremoracletoawsrds

1 – Create an user to be used to connect to the Source database. Eg:MIGUERSOURCE;


2 - Enable Supplemental logging in all tables; (script_01.sql)
3 - Minimal Supplemental Logging (database level); (script_02.sql)
4 - Give all the permissions to the user that it will be connected to this source database as
Endpoint in the DMS tool; (script_03.sql)
5 - Grant to user for the DMS to be able to validate BLOB data types in the DMS tool;
(script_04.sql)
6 – Give a grant of SELECT on all tables to be migrated to the user MIGUSERSOURCE;
(script_05.sql)

16
© 2020 IBM
How to configure your Oracle
On-Prem To be migrated to AWS
RDS Oracle?
Scripts in https://github.com/brunorsreis/migonpremoracletoawsrds

7 - Grant DBA: This other grant is just my personal choice. As I want that the user has full
permission and to avoid any other permission problem I would give the DBA grant and revoke it
once the migration is done; (script_06.sql)
8 - For the capture and apply changes (CDC) you also need execute on DBMS_LOGMNR and select
on V_V$LOGMNR_LOGS, V_$LOGMNR_CONTENTS to the user of the migration; (script_07.sql)
9 - LOGMINING /* For Oracle 12c and higher. */; (script_08.sql)
10 - Determine the maximum LOB column of the migrated tables; (script_09.sql)
11 - Configure a backup routine of your archives On-Prem that must be able to keep the archives
time enough to be shipped to the AWS RDS Oracle instance ; (24 hours is usually enough –
Amazon’s recommendation)

17
© 2020 IBM
How to configure your Oracle On-Prem
To be migrated to AWS RDS
Oracle?

- Note: DMS will only push Table DDL and PK , all other additional objects may be created either
before the CDC part , for instance indexes, or after the whole operation.

18
© 2020 IBM
How to configure your ORACLE
to receive data from an Oracle
On-Prem?
” Services -> Amazon RDS -> Create Database”

19
© 2020 IBM
How to configure your Oracle
On-Prem To be migrated to AWS
RDS Oracle?
1 – User to connect to the Target Endpoint probably will be the user owner of the AWS RDS
instance.
2 - Get DDL Tablespaces from the Source database and create in your target database ;
(script_10.sql)
3 - Extract the DDL of the profiles and create it in your target database ; (script_11.sql)
4 - Extract the DDL of the users and create it in your target database ; (script_12.sql)
5 - List and extract the DDL of the tables from the Source and create it in your Target database ;
(script_13.sql)
6 - Get all the grants from the source (script_14.sql)
7 - Amazon’s recommendation to create your tablespace as Bigfile tablespaces in the target;
(script_15.sql)

20
© 2020 IBM
How to configure your Oracle
On-PremTo be migrated to AWS
RDS Oracle?
8 - For full-load and CDC-enabled task, Amazon recommends that you drop primary key indexes,
secondary indexes, referential integrity constraints, and data manipulation language (DML)
triggers before the start of the task and create them once the full load phase has completed.
(ORA-02266: unique/primary keys in table referenced by enabled foreign keys ); (script_16.sql)
9 - If you are running FULL LOAD and CDC right away, I would suggest you create the index in the
target after the FULL LOAD to speed up the CDC process; (script_17.sql)

21
© 2020 IBM
How to configure your Oracle
On-Prem to be migrated to AWS
RDS Oracle?
Scripts in https://github.com/brunorsreis/migonpremoracletoawsrds

22
© 2020 IBM
How to configure your Oracle
On-Prem to be migrated to AWS
RDS Oracle?
— To connect to your Target database you must have a configured network between the source
and the target :

Source database:

23
© 2020 IBM
How to configure your Oracle
On-Prem to be migrated to AWS
RDS Oracle?
— To connect to your Target database you must have a configured network between the source
and the target :

Target:

24
© 2020 IBM
How to create a task at DMS
and start your migration?

25
© 2020 IBM
How to create a task at DMS
and start your migration?
— The first thing to do to be able to create a task at DMS services is to have a DMS replication
instance:

Go through the AWS console : https://aws.amazon.com/console/?nc1=h_ls

26
© 2020 IBM
How to create a task at DMS
and start your migration?

27
© 2020 IBM
How to create a task at DMS
and start your migration?
— The first thing to be able to create a task at DMS services is to have a DMS replication
instance:

Steps “Services” -> “AWS DMS” -> “Replication instance” -> button “Create replication
instance”

28
© 2020 IBM
How to create a task at DMS
and start your migration?

29
© 2020 IBM
How to create a task at DMS
and start your migration?

30
© 2020 IBM
How to create a task at DMS
and start your migration?

31
© 2020 IBM
How to create a task at DMS
and start your migration?

32
© 2020 IBM
How to create a task at DMS
and start your migration?
— After created you will see your replication instance as below (in this case I have created 2
DMS instances used in different migrations):

33
© 2020 IBM
How to create a task at DMS
and start your migration?
— Source Endpoint:

Then to create the 2 endpoints you have to go through these steps “Services” -> “AWS DMS” ->
“Resource management” -> Endpoints-> button “Create endpoint”.

34
© 2020 IBM
How to create a task at DMS
and start your migration?
— Source Endpoint:

35
© 2020 IBM
How to create a task at DMS
and start your migration?
— Source Endpoint:

36
© 2020 IBM
How to create a task at DMS
and start your migration?
— Source Endpoint:

37
© 2020 IBM
How to create a task at DMS
and start your migration?
— Target Endpoint:

Then to create the 2 endpoints you have to go through these steps “Services” -> “AWS DMS” ->
“Resource management” -> Endpoints-> button “Create endpoint”.

38
© 2020 IBM
How to create a task at DMS
and start your migration?
— Target Endpoint:

39
© 2020 IBM
How to create a task at DMS
and start your migration?
— Target Endpoint:

40
© 2020 IBM
How to create a task at DMS
and start your migration?
— Target Endpoint:

41
© 2020 IBM
How to create a task at DMS
and start your migration?
— Endpoints:

42
© 2020 IBM
How to create a task at DMS
and start your migration?
— Now that we have both the Source and Target Endpoints, the replication instance and both
target and source databases configured is time to create the DMS task.

43
© 2020 IBM
How to create a task at DMS
and start your migration?
— AWS DMS -> Conversion & migration -> Database migration tasks -> Button “Create Task”.

44
© 2020 IBM
How to create a task at DMS
and start your migration?
— AWS DMS -> Conversion & migration -> Database migration tasks -> Button “Create Task”.

45
© 2020 IBM
How to create a task at DMS
and start your migration?
— AWS DMS -> Conversion & migration -> Database migration tasks -> Button “Create Task”.

46
© 2020 IBM
How to create a task at DMS
and start your migration?
— AWS DMS -> Conversion & migration -> Database migration tasks -> Button “Create Task”.

47
© 2020 IBM
How to create a task at DMS
and start your migration?
— AWS DMS -> Conversion & migration -> Database migration tasks -> Button “Create Task”.

If you have XMLTYPE data type DMS has a limitation and it won’t work with “Full LOB mode” and
your task will fail with the following error “ORA-24318: call not allowed for scalar data types”.

48
© 2020 IBM
How to create a task at DMS
and start your migration?
— AWS DMS -> Conversion & migration -> Database migration tasks -> Button “Create Task”.

49
© 2020 IBM
How to create a task at DMS
and start your migration?
— AWS DMS -> Conversion & migration -> Database migration tasks -> Button “Create Task”.
JSON EDITOR: Example of migration the user BRUNORSTECH to other user with the same name in
the Target database:

50
© 2020 IBM
How to create a task at DMS
and start your migration?
— AWS DMS -> Conversion & migration -> Database migration tasks -> Button “Create Task”.
Guided UI: Example of migration the user BRUNORSTECH to other user with the same name in
the Target database:

51
© 2020 IBM
How to create a task at DMS
and start your migration?
— AWS DMS -> Conversion & migration -> Database migration tasks -> Button “Create Task”.
Guided UI: Example of migration the user BRUNORSTECH to other user with the same name in
the Target database:

52
© 2020 IBM
How to create a task at DMS
and start your migration?
— AWS DMS -> Conversion & migration -> Database migration tasks -> Button “Create Task”.
Guided UI: Example of migration the user BRUNORSTECH to other user with the same name in
the Target database:

53
© 2020 IBM
How to create a task at DMS
and start your migration?
— AWS DMS -> Conversion & migration -> Database migration tasks -> Button “Create Task”.
Additionally you can create a control table in the “Advanced task settings”:

54
© 2020 IBM
How to create a task at DMS
and start your migration?
— AWS DMS -> Conversion & migration -> Database migration tasks -> Button “Create Task”.

55
© 2020 IBM
How to create a task at DMS
and start your migration?

56
© 2020 IBM
DMS limitation and my
experience (Pros X Cons) to
migrate your Oracle database
On-prem to AWS RDS
— 49282892: 2019-11-17T13:27:49:574556 [SOURCE_CAPTURE ]D: Get archived REDO log with
sequence 104086 for the first SCN in thread 1 (oracdc_reader.c:304)

57
© 2020 IBM
DMS limitation and my
experience (Pros X Cons) to
migrate your Oracle database
On-prem to AWS RDS
— Enable constraint

58
© 2020 IBM
DMS limitation and my
experience (Pros X Cons) to
migrate your Oracle database
On-prem to AWS RDS

“AWS DMS doesn’t support the Use direct path full load option for tables with INDEXTYPE
CONTEXT. As a workaround, you can use array load. “
— DMS does not support XMLTYPE and some issues to migrate CLOB, BLOB tables when these
tables don’t have a primary key.
— I found only a few posts and articles on how to migrate an Oracle On-Prem to AWS RDS

59
© 2020 IBM
DMS limitation and my
experience (Pros X Cons) to
migrate your Oracle database
On-prem to AWS RDS

— Full knowledge of all database data types


— Many manual procedures
— You can’t resize Smallfile datafiles
— Amazon’s commands to check archive area, log files and so on.

60
© 2020 IBM
DMS limitation and my
experience (Pros X Cons) to
migrate your Oracle database
On-prem to AWS RDS

— Amazon’s RDS database has the SYSDBA user removed, and has replaced it with their
RDSADMIN user
— DMS will only push Table DDL and PK , all other additional objects may be created either
before the CDC part , for instance indexes, or after the whole operation.”
— Oracle Open World Keynote 2019: I was in San Francisco and I attended the Keynote this
year and besides of my consideration above, Larry Elisson has done a lot more of comparision
between running your Oracle Database at AWS or at Gen 2 Cloud Autonomous Infrastructure.
Check out the video of the KeyNote: https://www.youtube.com/watch?v=lIgGrDQb2OQ
61
© 2020 IBM
DMS limitation and my
experience (Pros X Cons) to
migrate your Oracle database
On-prem to AWS RDS using DMS

— Very good support from Amazon


— Amazon RDS Multi-AZ Deployments
— RDS is managed by AWS and it performs a lot of tasks that a DBA would perform in the daily-
basis as Backup/Recovery, Multi-AZ in case of failures, Upgrades, Patching, both alerts and
monitoring provided by CloudWatch and also maintenance in the hosts.
— You can use AWS Schema Conversion Tool
— IO Benchmarking
— Support to Open Source database as PostgreSQL and other databases as MySQL and SQL
Server. 62
© 2020 IBM
DMS limitation and my
experience (Pros X Cons) to
migrate your Oracle database
On-prem to AWS RDS

— Will Amazon RDS for Oracle be supported?


BYOL: Under this model, you will continue to use your active Oracle support account and contact Oracle
directly for Oracle Database specific service requests. If you have an active AWS Premium Support account,
you can contact AWS Premium Support for Amazon RDS specific issues. Amazon Web Services and Oracle
have multi-vendor support process for cases which require assistance from both organizations.
License Included: In this model, if you have an active AWS Premium Support account, you should contact
AWS Premium Support for both Amazon RDS and Oracle Database specific service requests.

63
© 2020 IBM
QUESTIONS?

64
© 2020 IBM
65
© 2020 IBM
References:
— Common DBA Tasks for Oracle DB Instances
(https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.CommonDBATasks.htm
l)
— Creating and Sizing Tablespaces
(https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.CommonDBATasks.Dat
abase.html#Appendix.Oracle.CommonDBATasks.CreatingTablespacesAndDatafiles)
— Connecting to a DB Instance Running the Oracle Database Engine
(https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToOracleInstance.html)
— Using an Oracle Database as a Target for AWS Database Migration Service
(https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Oracle.html)
— Working with an AWS DMS Replication Instance
(https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.html)
— Working with AWS DMS Endpoints (
https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Endpoints.html)
— Working with AWS DMS Tasks
(https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.html)
— Creating a Task (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.Creating.html)
— Using Table Mapping to Specify Task Settings
(https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.ht
ml)
— Using an Oracle Database as a Target for AWS Database Migration Service
(https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Oracle.html)
— Amazon RDS Multi-AZ Deployments (https://aws.amazon.com/rds/details/multi-az/) 66
© 2020 IBM
References:
— Best Practices for AWS Database Migration Service
(https://docs.aws.amazon.com/dms/latest/userguide/CHAP_BestPractices.html)
— Data Types for AWS Database Migration Service
(https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Reference.DataTypes.html)
— Oracle FAQ (https://aws.amazon.com/oracle/faq/)

67
© 2020 IBM

You might also like