2. MARCUS VINICIUS MIGUEL PEDRO
• Blog: https://www.viniciusdba.com.br/
• 23 years working in IT Industry
• 14+ year working with Oracle Database
• GUOB Board Member (Brazilian Oracle User Group)
• Speaker in Oracle-related events: GUOB, IFSP, FATEC, OOW Latin America
• Technical Reviewer for Oracle Press Book: Oracle Database 12c Oracle RMAN Backup and Recovery
• Based in São Paulo (Brazil)
• Worked for 9 years in Discover Technology (one of the main database partners for Oracle in Brazil) as an Oracle DBA: 2005 – 2014
• Worked for 4 years in Oracle Advanced Customer Support Services in Brazil as an Oracle DBA: 2014 – 2018
• Working for Accenture Enkitec Group as an Oracle DBA since June, 2018
4. ACCENTURE ENKITEC GROUP
CAPABILITIES OVERVIEW
4
• Global systems integrator focused on the Oracle platform
• Consultants average 15+ years of Oracle experience
• Worldwide specialist in Engineered Systems implementations
• 14 Oracle ACE members, specialist recognized by Oracle for their technical expertise
Elite
Expertise
Oracle Specializations*
• Oracle Exadata
• Oracle Exalogic
• Oracle Database
• Oracle GoldenGate
• Oracle Data Integrator
• Oracle Database
• Oracle Data Warehouse
• Oracle Real Application Cluster
• Oracle Performance Tuning
• Oracle Database Security
Thought
Leadership
Success
Our consultants have been published in multiple subject
areas and additional online resources that demonstrate
Accenture’s experience and expertise with the OES platform
Oracle Engineered Systems Numbers
• 1000+ Oracle Engineered Systems which AEG have configured, patched or supported.
• 140+ AEG resources which have an average 15+ years of Oracle experience
• AEG Support across 9 countries
• 200 Oracle Engineered Systems (Exadata/Exalogic etc) currently under management directly by AEG
• 200+ customers in either the AEG Managed Services program or remoteDBA program
• 50,000 Accenture Oracle IDC resources that can be leveraged for Level 1 & Level 2 support
6. AGENDA
OCI Key Concepts
Will DBA Jobs Be Dead?
Database On OCI Concepts
Considerations to Migrate Your Database
Methods to Migrate Your Database to Cloud
QA
8. OCI
KEY CONCEPTS
COMPARTMENTS
• Compartment is a logical workspace of related resources (instances, VCNs, block volumes, etc)
• Can be accessed by groups that have have been given permission by an administrator
• When you sign up for OCI, Oracle creates your tenancy, which is the root compartment
• You can create compartments to organize and isolate your cloud resources:
• DEV_COMPARTMENT;
• QA_COMPARTMENT;
• PROD_COMPARTMENT.
9. OCI
KEY CONCEPTS
TERMINOLOGY
• Region is a localized geographic area (Disaster Recover)
• Availability Domain is one or more data center located within a region isolated from each other
(High Availability)
• Virtual Cloud Network (VCN) is a virtual version of a traditional network, with subnets, route
tables and gateways
• Instance is a compute host
• Shape specifies the number of CPUs and amount of memory. This will change!
• Block Volume is a virtual disk
• Object Storage is a storage architecture to store and manage data as objects
• Oracle Cloud Identifier (OCID) is an Oracle-assigned unique ID for each resource in OCI
21. WILL DBA JOBS BE DEAD?
JOB TRANSFORMATION
Need to learn new “stuff”
• Architecture
• Infrastructure (Security, Network, etc)
• Cloud features (not only Database)
• Infrastructure as Code (Iac): OCI-Cli, Terraform
• DevOps Tools: Ansible, Puppet, git, etc
• Application – Design and Development
23. DATABASE OFFERS IN OCI
• Bare Metal DB Systems
• Virtual Machine DB Systems
• Exadata DB Systems
• Autonomous Data Warehouse
• Autonomous Transaction Processing
Not covered in this session
24. DATABASE LICENSING MODELS
Two Types of Licensing
• License Included
• Bring Your Own License (BYOL)
Prices may vary according with your contract with Oracle
• Pricing and Features: https://cloud.oracle.com/database/pricing
26. DATABASE EDITIONS
STANDARD EDITION
Features
• All features included in Oracle Database Standard Edition 2
• Full Oracle Database Instance
• Up to 24 CPUs
• Transparent Data Encryption
27. DATABASE EDITIONS
ENTERPRISE EDITION
Features
• Includes Oracle Database Enterprise Edition plus:
• Data Masking and Subsetting Pack
• Diagnostics and Tuning Packs
• Real Application Testing
• Transparent Data Encryption
28. DATABASE EDITIONS
ENTERPRISE EDITION – HIGH PERFORMANCE
Features
• Includes all the features from Enterprise Edition plus:
• Multitenant
• Partitioning
• Advanced Compression
• Advanced Security
• Label Security
• Database Vault
• OLAP
• Advanced Analytics
• Database Lifecycle Management Pack
• Cloud Management Pack for Oracle Database
• Transparent Data Encryption
29. DATABASE EDITIONS
ENTERPRISE EDITION – EXTREME PERFORMANCE
Features
• Includes all the features from Enterprise Edition – High Performance plus
• In-Memory Database
• Active DataGuard
• RAC (only for Virtual Machine DB Systems or Exadata Cloud Service)
• Transparent Data Encryption
30. DATABASE VERSIONS
Versions Supported
• Oracle Database 11g Release 2 (11.2)
• Oracle Database 12c Release 1 (12.1)
• Oracle Database 12c Release 2 (12.2)
• Oracle Database 18c (18.0)
• Oracle Database 19c (19.0) – Only for VM DB Systems and Exadata – Sep/2019
31. DATABASE CLOUD SERVICE
OVERVIEW
Virtual Machine Bare Metal Exadata
CPU and Memory CPU: 1 – 24 (48 with RAC)
Memory: 15-320 GB
CPU: 2 – 52
Memory: 768 GB
CPU: 0 – 368
Memory: 720-5760 GB
Storage Type Block Locally attached NVMe Exadata
Max DB Size 40 TB 16 TB 342.1 TB
Scaling Storage Scaling CPU Scaling CPU Scaling
High Availability 2 node RAC N/A Up to 8 node RAC
Backups Automatic (Incremental) as well as On Demand (Full)
Disaster Recovery Data Guard
Patching User Controlled
Versions 11.2,12.1, 12.2, 18c, 19c 11.2,12.1, 12.2, 18c 11.2,12.1, 12.2, 18c, 19c
Database Editions Standard, Enterprise, High Performance, Extreme Performance
Editions
Extreme Performance Edition
Number of DB Instances One CDB (But with Multiple
PDBs)
Multiple CDBs (and also
Multiple PDBs)
Multiple CDBs (and also Multiple
PDBs)
Licensing BYOL or License Included
32. VIRTUAL MACHINE DB SYSTEMS
KEY USE CASES
Enterprise
Applications (Oracle
and 3rd Party)
Disaster Recovery
Application
Development
33. BARE METAL DB SYSTEMS
KEY USE CASES
Enterprise
Applications (Oracle
and 3rd Party)
Disaster Recovery
Application
Development
34. EXADATA CLOUD SERVICE
KEY USE CASES
Mission Critical
Production
Databases
Disaster Recovery
Application
Development Consolidation Analytics
38. OCI
DATABASE ON CLOUD
• It Depends!
• Are you planning to move your application ecosystem to cloud?
39. OCI
DATABASE ON CLOUD
Big Challenge when moving databases to Cloud
• Traffic between Database tier and Application tier
• Moving your application ecosystem along with database you can benefit from Cloud features/advantages
• If some piece/part of your application remains in On-Premises DataCenter, even with FastConnect you can expect
some increase on response time.
43. OCI
DATABASE SIZING
Some Questions
• Actually, do you have waits for CPU?
• If yes, how long are the waits? Those waits impact business?
• If yes, maybe your CPU is under pressure
• If no, probably you have spikes
Let’s assume as example that you have spikes in CPU usage
47. OCI
DATABASE SIZING
How measure CPU usage?
• If you have Diagnostics Pack: DBA_HIST_ACTIVE_SESS_HISTORY (ASH)
• If you don’t, STATSPACK or any external OS monitoring tool
48. OCI
DATABASE SIZING
DBA_HIST_ACTIVE_SESS_HISTORY
• Query for how many sessions are waiting for CPU (WHERE session_state = 'ON CPU' )
Main Issue
• ASH is sampled only when there is activity
• Some periods of time without activity do not generate ASH samples
How to avoid issues when using ASH to sizing CPU usage?
• ASH Standardization!
• Jorge Barba from Acenture Enkitec Group:
https://jorgebarbablog.wordpress.com/2016/12/21/how-to-standardize-ash-data-for-sizing/
50. OCI
DATABASE SIZING
With ASH data standardized, should I use MAX values?
• Only if you cannot tolerate any pain!
Can I use AVERAGE?
• No! You can have some spike periods much biggest than AVERAGE.
51. OCI
DATABASE SIZING
What I can do to find out the “Magic Number”?
• You can use percentiles.
Percentiles in One Hour
• 97th percentile: longest wait is 1.8 min in 60 mins
• 95th percentile: longest wait is 3 min in 60 mins
• 90th percentile: longest wait is 6 min in 60 mins
• 80th percentile: longest wait is 12 min in 60 mins
https://jorgebarbablog.wordpress.com/2016/12/27/sizing-post-3-understanding-percentiles/
52. OCI
DATABASE SIZING
How is the appropriate percentile for my database workload?
How much pain are you willing to tolerate?
53. OCI
DATABASE SIZING
Memory
• Should be the same. Check the Shapes available to fit your need
IOPS
• AWR:
• physical read total IO requests
• physical write total IO requests
I/O Throughput
• AWR:
• physical read bytes
• physical write bytes
54. OCI
DATABASE SIZING
mig360
• Tool created by Alex Zaballa | https://github.com/alexzaballa/migration360
• Database Configuration
• Patch Info
• Memory Usage
• Storage Usage
• CPU Usage
• ASH Top Consumers
61. OCI
CHOOSING A METHOD
DATABASE MIGRATION METHODS
1. Database version of your on-premises database:
• Oracle Database 19c
• Oracle Database 18c
• Oracle Database 12c Release 2 version 12.2.0.1
• Oracle Database 12c Release 1 version 12.1.0.2
• Oracle Database 12c Release 1 version lower than 12.1.0.2
• Oracle Database 11g Release 2 version 11.2.0.3 or higher
• Oracle Database 11g Release 2 version lower than 11.2.0.3
62. OCI
CHOOSING A METHOD
DATABASE MIGRATION METHODS
2. For on-premises Oracle Database 12c Release 2 and Oracle
Database 12c Release 1 databases, the architecture of database
• Multitenant container database (CDB)
• Non-CDB
3. Endian format (byte ordering) of your on-premises database’s
host platform
• OCI Databases use the Linux platform, which is little endian
63. OCI
CHOOSING A METHOD
DATABASE MIGRATION METHODS
4. Database character set of your on-premises database and the
OCI Database
• Some migrations methods require that the source and target
databases use compatible database character sets
64. OCI
CHOOSING A METHOD
DATABASE MIGRATION METHODS
5. Database version of OCI Database you are migrating to
• Oracle Database 19c
• Oracle Database 18c
• Oracle Database 12c Release 2
• Oracle Database 12c Release 1
• Oracle Database 11g Release 2
For Oracle Database 12c Release 2 and Oracle Database 12c Release 1 databases:
• Enterprise Edition: single tenant
• High Performance or Extreme Performance: multitenant
65. OCI
DATABASE MIGRATION
FROM ORACLE DATABASE 11g TO ORACLE DATABASE 11g IN THE CLOUD
Methods
• Data Pump Conventional Export/Import
• Data Pump Transportable Tablespace
• RMAN Transportable Tablespace with Data Pump
• RMAN CONVERT Transportable Tablespace with Data Pump
• Creating a DB System from On-Premises Backup in the Cloud
• Database Backup Cloud Service
• Golden Gate
• DataGuard
66. OCI
DATABASE MIGRATION
FROM ORACLE DATABASE 11g TO ORACLE DATABASE 12c IN THE CLOUD
Methods
• Data Pump Conventional Export/Import
• Data Pump Transportable Tablespace
• RMAN Transportable Tablespace with Data Pump
• RMAN CONVERT Transportable Tablespace with Data Pump
• Creating a DB System from On-Premises Backup in the Cloud
• Database Backup Cloud Service
• Golden Gate
• DataGuard
• Data Pump Full Transportable
67. OCI
DATABASE MIGRATION
FROM ORACLE DATABASE 12c Non-CDB TO ORACLE DATABASE 12c IN THE CLOUD
Methods
• Data Pump Conventional Export/Import
• Data Pump Transportable Tablespace
• RMAN Transportable Tablespace with Data Pump
• RMAN CONVERT Transportable Tablespace with Data Pump
• Creating a DB System from On-Premises Backup in the Cloud
• Database Backup Cloud Service
• Golden Gate
• DataGuard
• RMAN Cross-Platform Transportable Backup Sets
• Data Pump Full Transportable
• Unplugging/Plugging (CDB)
• Remote Cloning (CDB)
• SQL Developer and SQL*Loader to Migrate Selected Objects
• SQL Developer and INSERT Statements to Migrate Selected Objects
68. OCI
DATABASE MIGRATION
FROM ORACLE DATABASE 12c CDB TO ORACLE DATABASE 12c IN THE CLOUD
Methods
• Data Pump Conventional Export/Import
• Data Pump Transportable Tablespace
• RMAN Transportable Tablespace with Data Pump
• RMAN CONVERT Transportable Tablespace with Data Pump
• Creating a DB System from On-Premises Backup in the Cloud
• Database Backup Cloud Service
• Golden Gate
• DataGuard
• RMAN Cross-Platform Transportable Backup Sets
• Data Pump Full Transportable
• Unplugging/Plugging (CDB)
• Remote Cloning (CDB)
• SQL Developer and SQL*Loader to Migrate Selected Objects
• SQL Developer and INSERT Statements to Migrate Selected Objects
• RMAN Cross-Platform Transportable PDB
All methods above also applies for Oracle Database 18c and Oracle Database 19c
69. OCI
DATABASE MIGRATION
METHODS
Method Endian Character Set
Data Pump Any Any
Data Pump Transportable Tablespace Little Compatible
RMAN Transportable Tablespace with Data Pump Little Compatible
RMAN Convert Transportable Tablespace with Data Pump Any Compatible
Data Pump Full Transportable Any (>= 11.2.0.3) Compatible
RMAN Cross-Platform Transportable Tablespace Backup Sets Any Compatible
Unplugging/Plugging Little Compatible
70. OCI
DATABASE MIGRATION
METHODS
Method Endian Character Set
Remote Cloning Little Compatible
RMAN Cross-Platform Transportable PDB Little Compatible
GoldenGate Any (>= 8i) Any
DataGuard Little (>= 11.2.0.4) N/A
Database Backup Cloud Service Little (>= 11.2.0.4) N/A
Creating DB System from On-Premises Backup in the Cloud Little (>= 11.2.0.4) N/A
SQL Developer Methods Any Any
71. OCI
CHOOSING A METHOD
DOWNTIME
The Big Challenge migrating a Database:
What is Downtime Allowed?
This answer doesn’t matter if you are migrating to Cloud or not.
How long does it take to upload your data to the Cloud?
72. OCI
DATABASE MIGRATION
DATA TRANSFER SERVICE X DOWNTIME
https://cloud.oracle.com/storage/data-transfer-appliance/faq#datatransferappliance
Dataset Size/
Link Bandwidth
10 Mbps 100 Mbps 1 Gbps 10 Gbps
Data Transfer
Service
10TB 92 Days 9 Days 22 Hours 2 Hours 1 Week
100TB 1018 Days 101 Days 10 Days 24 Hours 1 Week
500TB 5092 Days 509 Days 50 Days 5 Days 1 Week
1PB 10185 Days 1018 Days 101 Days 10 Days 1 Week
75. OCI
DATABASE MIGRATION
DATA TRANSFER APPLIANCE
• OCI Customers can use Data Transfer Appliance service for free
• Customers are only charged for Object Storage usage once the data is transferred to bucket
• Data are encrypted using AES-256 encryption. The encryption keys are never stored on appliance
• Shipping is free. Oracle pays to ship the transfer appliance and then back to Oracle
• File size limit is 10TB per file
• A manifest file captures MD5 for each file uploaded. When imported to the bucket, MD5 should match
• Limit of 150 TB per appliance
• Limited only to 4 regions across the World: us-phoenix-1, us-ashburn-1, eu-frankfurt-1 and eu-london-1
• Not possible to request service if based outside US
• If based in EU, can be shipped only to Frankfurt and then uploaded to Frankfurt or London
76. OCI
DATABASE MIGRATION
DATA TRANSFER DISK
• You can use commodity hard drives to transfer your data on regions that Data Transfer Appliance is not offered
• Disks supported are:
• SATA II/III 2.5" or 3.5" HDDs;
• External USB 2.0/3.0 HDDs.
• This transfer solution requires you to source and purchase the disks used to transfer data to OCI
• The disks are shipped back to you after data is successfully uploaded
• You should create a transfer package that represents a logical package that you ship to Oracle
• Each transfer package can include up to 10 transfer disks
• Limit of 100TB per transfer package
• If you need to transfer more than 100TB, you should create additional transfer packages
77. OCI
DATABASE MIGRATION
ZERO DOWNTIME MIGRATION
• Oracle Zero Downtime Migration tool
• Single button approach
• Fully MAA-compliant
• ZDM leverages Oracle DataGuard to provide an automated migration for your on-premises database
• Five step process:
- Analyze both source and target databases
- Prepare both databases
- Migrates your data
- Provides monitoring
- Execute a controlled switchover
• Coming soon!
https://www.oracle.com/database/technologies/rac/zdm.html
78. OCI
DATABASE MIGRATION
DATA PUMP CONVENTIONAL EXPORT/IMPORT – CONSIDERATIONS
• Little or Big Endian format on Source
• Any character set on Source (make sure that the conversion will not corrupt data)
• From 10g onwards
• Migration possible from non-CDB to PDB
• Changes to database structure supported
• Upgrade possible to a new version
https://docs.cloud.oracle.com/iaas/Content/Database/Tasks/mig-data-pump-conventional.htm
79. OCI
DATABASE MIGRATION
CREATING A DB SYSTEM FROM ON-PREMISES BACKUP IN THE CLOUD – CONSIDERATIONS
• Source DB version from 11.2.0.4 onwards
• Source DB on Linux
• Not possible to upgrade to a new version
• Not possible to migrate from non-CDB to PDB
• Not possible to change database structure
• Need to install OCI-CLI and Database Backup Cloud Module on On-Premises Server
https://docs.cloud.oracle.com/iaas/Content/Database/Tasks/mig-onprembackup.htm
81. OCI
DATABASE MIGRATION
DATABASE BACKUP CLOUD MODULE – CONSIDERATIONS
• Source DB version from 11.2.0.4 onwards
• Source DB on Linux
• Not possible to Upgrade
• Not possible to migrate from non-CDB to PDB
• Not possible to upgrade to a new version
• Install Database Backup Cloud Module and configure on On-Premises host
• You need to create a DB System or a IaaS compute instance and install Oracle binaries prior restore backup
https://blogs.oracle.com/imc/migrate-on-premise-db-to-database-cloud-service-using-cloud-db-backup-module
82. OCI
DATABASE MIGRATION
GOLDENGATE – CONSIDERATIONS
• Source DB version from 8i onwards
• Migration possible from non-CDB to PDB
• Changes to database structure supported
• Upgrade possible to a new version
• You can use for free until May 2020 -
https://cloudmarketplace.oracle.com/marketplace/en_US/listing/58489224
• Near Zero downtime migration
84. OCI
DATABASE MIGRATION
DATAGUARD – CONSIDERATIONS
• Source DB version from 11.2.0.4 onwards
• Source DB on Linux
• Not possible to upgrade to a new version
• Not possible to migrate from non-CDB to PDB
• Not possible to change database structure
• Minimal downtime migration
86. OCI
DATABASE MIGRATION
TRANSPORTABLE TABLESPACE – CONSIDERATIONS
• Source DB version 8i and 9i (little endian)
• Source DB version from 10g onwards (cross-endian)
• Migration possible from non-CDB to PDB
• Upgrade possible to a new version
88. OCI
DATABASE MIGRATION
UNPLUGGING/PLUGGING – CONSIDERATIONS
• Source DB version from 12c (multitenant) onwards
• Source DB on Linux
• Not possible to Upgrade to a new version
• Not possible to change the database structure
• Possible to migrate from non-CDB to PDB
https://docs.cloud.oracle.com/iaas/Content/Database/Tasks/mig-unplugging-plugging-pdb.htm
https://docs.cloud.oracle.com/iaas/Content/Database/Tasks/mig-unplugging-plugging-non-cdb.htm
89. OCI
DATABASE MIGRATION
REMOTE CLONING – CONSIDERATIONS
• Source DB version from 12c (multitenant) onwards
• Source DB on Linux
• Not possible to Upgrade to a new version
• Not possible to change the database structure
• Possible to migrate from non-CDB to PDB
https://docs.cloud.oracle.com/iaas/Content/Database/Tasks/mig-remote-cloning-pdb.htm
https://docs.cloud.oracle.com/iaas/Content/Database/Tasks/mig-remote-cloning-non-cdb.htm
90. OCI
DATABASE MIGRATION
SQL DEVELOPER METHODS – CONSIDERATIONS
• Source DB version from 8i onwards
• Any character set on Source (make sure that the conversion will not corrupt data)
• Migration possible from non-CDB to PDB
• Changes to database structure supported
• Upgrade possible to a new version
https://docs.cloud.oracle.com/iaas/Content/Database/Tasks/mig-sql-dev-and-insert.htm
https://docs.cloud.oracle.com/iaas/Content/Database/Tasks/mig-sql-dev-and-sql-loader.htm
92. OCI
DATABASE MIGRATION
CONCLUSION – ITEMS TO CONCERN
• Sizing: spend some time in this item. Make sure that you can afford your workload not spending a bunch of money
• Cloud Architecture: your Cloud Architect must spend some time on Cloud Architecture and Design. How is the high-
availability and DR design. Where application servers will be located, what will be the subnets, security lists and all related
information about it
• Connectivity: how your users will connect to applications. You must use a Public Subnet for your applications? Probably not,
you must ensure that you have redundant VPN between your company and OCI
93. OCI
DATABASE MIGRATION
CONCLUSION – MIGRATION METHODS
• Not all methods are applicable to all versions and platforms
• If you are running on 10g, your best approach to ensure that downtime will be minimal is Golden Gate. With Data
Pump your can expect a big outage meanwhile migration is in progress. But you can combine both methods: you can
use Data Pump to export your database, then import on Cloud, Initial load, and then use Golden Gate to sync
databases
• If you are running on <= 11.2.0.3, your best approach is upgrade your On-Premises to 11.2.0.4, so you can use
DataGuard
• If you are running your On-Premises database on IBM-AIX, you must CONVERT your datafiles to Little Endian
• The options are many, you must spend some time to study the pros and cons for each method before choose the
final method
95. REACH OUT TO ME
blog@viniciusdba.com.br
twitter.com/viniciusdba
facebook.com/viniciusdba
linkedin.com/in/viniciusdba
https://www.slideshare.net/viniciusdba1