You are on page 1of 40

18 Methods for Database Migration to Oracle Cloud

김승현 / Solution Engineering


한국오라클 / Oracle Korea

1
Safe harbor statement

The following is intended to outline our general product direction. It is intended for information
purposes only, and may not be incorporated into any contract. It is not a commitment to deliver
any material, code, or functionality, and should not be relied upon in making purchasing decisio
ns.

The development, release, timing, and pricing of any features or functionality described for Ora
cle’s products may change and remains at the sole discretion of Oracle Corporation.

2 Copyright © 2019 Oracle and/or its affiliates


Program agenda

1 Database Migration 고려사항


2 배경 지식들
3 18 Methods for Database Migration

3 Copyright © 2019 Oracle and/or its affiliates


Database Migration을 위한 다양한 조합들

Little Endian ATP VM


Family Serverless DB System

Autonomous
Source 11gR2 Bare Metal Database on
Data
On-Premise DB System OCI Compute
Warehouse

11gR2, 12cR1,
ATP Exadata
Big Endian Family 12cR2, 18c,
Dedicated DB System
19c

4 Copyright © 2019 Oracle and/or its affiliates


Database Migration 방법 결정을 위한 고려 사항들

Source Source Source


Source CDB Source DB
Database Database Database
or Non CDB Data Types
Version Host OS Size

Source Project OCI


Permissible Network
Database Financials & DB System
Downtime Bandwidth
Character Set Licensing Versions

Staging Many More


Storage ....
Requirement ....

5 Copyright © 2019 Oracle and/or its affiliates


18 Methods for Database Migration to OCI

1. Data Pump Conventional Export Import 9. RMAN Cross Platform TTS Backup Sets
2. Data Pump Transportable Tablespace 10. RMAN Cross Platform Transportable PDB
3. Data Pump Full Transportable 11. RMAN Active Duplicate
4. MV2OCI: Move Data to Oracle Cloud Database in 12. RMAN Active Duplicate for PDBs
"One-Click" 13. Unplugging and Plugging a Non CDB
5. RMAN Restore and Recovery from Full Backup 14. Unplugging and Plugging a PDB
6. RMAN Transportable Tablespace with Data Pump 15. Remote Clone (Non CDB)
7. RMAN Convert Transportable Tablespace with Data 16. Remote Clone PDB
Pump
17. Hybrid DataGuard from On-Premise to OCI DB System
8. RMAN Cross Platform Incremental Transportable
Tablespace 18. Golden Gate Real Time Replication

6 Copyright © 2019 Oracle and/or its affiliates


Program agenda

1 Database Migration 고려사항


2 배경 지식들
3 18 Methods for Database Migration

7 Copyright © 2019 Oracle and/or its affiliates


PDB, CDB, NonCDB

Multitenant 아키텍처 (Oracle Database 12c 이상)

PDBs

Pluggable Databases (PDBs)


CDB

8 Copyright © 2019 Oracle and/or its affiliates


RMAN

데이타베이스의 Backup, Restore 및 Recovery를 수행하기 위한 클라이언트 유틸리티

✓ 백업에 필요한 설정을 관리


✓ 백업해야할 데이터를 알아서 인식 Image Copy, Incremental
✓ 복구에 필요한 백업을 자동으로 선택 BackupSet /Cumulative

✓ 백업 및 복구 명령의 단순화
✓ 데이터 블록 단위로 backup, restore, recovery 가능 Transportable Duplicate,
Tablespace Convert
✓ 파일 손상 감지
✓ RMAN 고유 기능 사용 가능

9 Copyright © 2019 Oracle and/or its affiliates


Data Guard 와 Oracle GoldenGate

▪ Data Guard : DR 솔루션 ▪ Oracle GoldenGate : 데이터동기화 솔루션


오라클 데이터베이스에 최적화된 DR 및 고가용 트랜잭션 로그를 이용하여 변경된 데이터를 동기화
성 솔루션 하는 방식

Source System Target System Source System Target System


Primary Database DB 변경정보 Standby Database 소스 타겟
Database Database
Oracle 인스턴스 Oracle 인스턴스 Oracle Oracle
DB 레벨에서 GoldenGate GoldenGate
물리적/논리적으로 TCP/IP
Trail Pump Trail
블록 정합성 체크 Extract Collector Replicat
Files Files SQL
복구용 복구용
파일 파일 Oracle, DB2
Transaction Log MySQL, PostgreSQL 등
(Redo/Archive Log)
데이터 파일 Oracle, DB2
데이터 파일
MySQL 등 ODS/DW, DR, Data Hub, Batch/Reporting System

10 Copyright © 2019 Oracle and/or its affiliates


Program agenda

1 Database Migration 고려사항


2 배경 지식들
3 18 Methods for Database Migration

11 Copyright © 2019 Oracle and/or its affiliates


Method01 : Data Pump Conventional Export Import

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ Endian Format 변환에 사용 ̶ 데이터베이스가 크면 시간이 걸림
̶ 캐릭터셋 변환에 사용 ̶ Role, 권한, 유저의 세밀한 관리가 필요
̶ 동일한 버전 또는 낮은버전에서 높은버전으로
마이그레이션에 사용
̶ 주로 Schema 마이그레이션에 사용

Prepare
Source Perform Securely Copy Prepare Perform
EXPDP to Created Dump Target IMPDP and
System for
Data pump Export Files to OCI for Data pump Validate
Export Schemas DBSystem Import Migrated Data

12 Copyright © 2019 Oracle and/or its affiliates


Method02 : Data Pump Transportable Tablespace

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ Conventional Export Import 보다 빠름 ̶ 호환 가능한 캐릭터셋일때 사용 가능
̶ 11g에서 11g 12c 18c 19c로 마이그레이션 시 사용 ̶ 테이블스페이스 자체가 포함되어있는지 확인
̶ TRANSPORT_TABLESPACES=TS1, TS
̶ TRANSPORT_FULL_CHECK=YES

Securely Copy Perform


Put Source Invoke Created Dump Create Import with
Tablespace in Transport Required
Files and Data Transport
Read Only Tablespaces Files to OCI Users at Datafiles
Mode Export DBSystem Target Option

13 Copyright © 2019 Oracle and/or its affiliates


Method03 : Data Pump Full Transportable

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ Endian Format 변환에 사용 ̶ 데이터베이스가 크면 시간이 걸림
̶ 11gR2에서 12c로 마이그레이션에 사용 ̶ 호환 가능한 캐릭터셋일때 사용 가능
̶ 12c NonCDB에서 12c로 마이그레이션에 사용
̶ 12c CDB에서 12c로 마이그레이션에 사용
̶ OnPremise >= 11.2.0.3

Invoke Full Y Securely Copy


Put Source and Created Dump Perform Full
Tablespace in Transportable
Transportable Files and Data Validate Data
Read Only ALWAYS Files to OCI Data pump
Mode Export DBSystem Import

14 Copyright © 2019 Oracle and/or its affiliates


Method04 : MV2OCI: Move Data to Oracle Cloud Database in "One Click"

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ 캐릭터셋 변환에 사용 ̶ 데이터베이스가 크면 시간이 걸림
̶ 동일한 버전 또는 낮은버전에서 높은버전으로 ̶ 시스템에 대한 root 권한이 필요함
마이그레이션시 사용 ̶ Datapump Files are directly moved to OCI
̶ Schema 마이그레이션에 사용 DBSystems

Prepare Install Create


Source MV2OCI RPM Configuration Perform
MV2OCI in Validate Data
System for at OnPremise File
MV2OCI Database (mv2oci.cfg) Auto Mode

15 Copyright © 2019 Oracle and/or its affiliates


Method05 : RMAN Restore and Recovery from Full Backup

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ OnPremise가 Little Endian인 경우 사용 ̶ 패치셋 레벨 및 패치 조정 필요
̶ 데이터베이스가 클수록 다운타임이 길어짐 ̶ 손쉬운 Migration으로 선호되는 방법
̶ Traditional Backup and Recovery ̶ NonProduction 마이그레이션에 주로 사용

Implement Create OCI


Implement Cloud Backup Take Backup DBSystem
TDE at to the OCI Validate the
Module at from Object DBSystem
OnPremise OnPremise Object Storage
Database Storage and Data
Database Backup

16 Copyright © 2019 Oracle and/or its affiliates


Method06 : RMAN Transportable Tablespace with Data Pump

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ OnPremise가 Little Endian인 경우 사용 ̶ 호환 가능한 캐릭터셋일때 사용 가능
̶ Tablespace Migration and Database Consolidation ̶ 마이그레이션 동안 OnPremise 테이블스페이스는
̶ NonProduction 마이그레이션에 주로 사용 R/W 가능
̶ OnPremise 운영환경에서 OCI DBSystem
개발/테스트 환경으로 복제하는데 사용

Create Securely Copy


AUXILIARY & Invoke Import
Backup Using the Content Create User with
TABLESPACE TRANSPORT from and DBA
Destination at TABLESPACE Transport
TABLESPACE Directory on Datafile
OnPremise Clause Destination to OCI DBSystem Option
Host OCI DBSystem

17 Copyright © 2019 Oracle and/or its affiliates


Method07 : RMAN Convert Transportable Tablespace with Data Pump

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ Endian Format 변환에 사용 ̶ 호환 가능한 캐릭터셋일때 사용 가능
̶ Tablespace Migration and Database Consolidation ̶ 마이그레이션 동안 OnPremise 테이블스페이스는
̶ RMAN 과 Data Pump는 별도로 실행 Read Only 모드
̶ NonProduction Migration에 주로 사용

Perform Invoke RMAN Invoke Import


Put Source EXPDP with with Create User with
Tablespaces In and DBA
TRANSPORT CONVERT Transport
Read Only TABLESPACES TABLESPACE Directory on Datafile
Mode Option Clause OCI DBSystem Option

18 Copyright © 2019 Oracle and/or its affiliates


Cloud Migration Quiz

데이터베이스 크기가 10TB 이상인 AIX에서 OnPremise


Database >= 11.2.0.4를 실행 중입니다. 참조 무결성 및 일부
지원되지 않는 데이터 타입으로 인해 Golden Gate는 사용할 수
없습니다. OCI DB 시스템으로 마이그레이션하는 데 6시간
이상의 다운타임은 허용될 수 없습니다.
선택할 수있는 가장 좋은 마이그레이션 방법은 어떤 것일까요?

Copyright © 2019 Oracle and/or its affiliates


Method08 : RMAN Cross Platform Incremental Transportable Tablespace

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ 대량의 데이터베이스에 최상의 방법 (Metadata ̶ 상당한 양의 DBA effort가 필요
Size is Small)
̶ 복잡하지만 많은 고객이 사용하는 방법
̶ Endian Format 변환에 사용
̶ 초기부터 마이그레이션 방법 안정화를 위한 노력
̶ 다운타임 감소 이 요구됨

Initial Setup Prepare Phase Roll Forward Transport


Data
(Source (Source Phase (Source Phase (Source
Validation
Online) Online) Online) Read Only)

20 Copyright © 2019 Oracle and/or its affiliates


Cloud Migration Quiz

OnPremise에 AIX에서 동작중인 100개 이상의 NonProduction


데이터베이스가 있습니다. 데이터베이스 통합의 일부로 OCI
DBSystem으로 마이그레이션하려고합니다. 가동 중지 시간은
제약 조건이 아니며 효과적이고 사용하기 쉬운 마이그레이션
방법을 찾고 있습니다.
이 시나리오에 가장 적합한 마이그레이션 방법은 무엇입니까?

Copyright © 2019 Oracle and/or its affiliates


Method09 : RMAN Cross Platform TTS Backup Sets

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ Endian Format 변환에 사용 ̶ 호환 가능한 캐릭터셋일때 사용 가능
̶ Tablespace Migration and Database Consolidation ̶ 마이그레이션 동안 OnPremise 테이블스페이스는
̶ Database Version >= 12.1.0.2 Read Only 모드
̶ 데이터베이스가 커질수록 다운타임 증가

Securely Copy
Backup Using
Put the Source TO
the Backup Restore
Tablespace in Foreign ALTER the
Sets and Data Tablespace to
PLATFORM Pump Export
Read Only Linux x86 64 Tablespace /
Mode Dump to Datafiles Read Write
bit
Destination

22 Copyright © 2019 Oracle and/or its affiliates


Cloud Migration Quiz

여러 CDB에 흩어져있는 OnPremise Little Endian Family에서


실행되는 중간크기(~ 500GB)의 12.2 Pluggable 데이터베이스
몇개가 있습니다. OCI ExaCS DBSystem으로 마이그레이션하고
통합하려고 합니다.
다운 타임을 줄일수 있는 방식을 고려할 때 가능한 최상의
마이그레이션 방법은 무엇입니까?

Copyright © 2019 Oracle and/or its affiliates


Method10 : RMAN Cross Platform Transportable PDB

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ OnPremise 데이터베이스가 Little Endian인 경우 ̶ 호환 가능한 캐릭터셋일때 사용 가능
사용
̶ 다운타임을 줄이기 위해 12.2 부터 backup에
̶ XML 파일을 사용한 RMAN 백업 기반 ‘ALLOW INCONSISTENT’ 기능 추가
마이그레이션
̶ 백업 시간 단축, 복원 시간은 동일하게 유지
̶ Database Version >= 12.1.0.2

(Close Source Restore


PDB) and Take Securely Copy Foreign Open the
the Backup Check PlugIn Restored
Backup … Compatibility Pluggable
For Transport Piece and PDB Database Pluggable
Allow Metadata at Destination from Backup Database
Inconsistent Sets

24 Copyright © 2019 Oracle and/or its affiliates


Cloud Migration Quiz

OnPremise에서 Oracle Database 11.2.0.4 또는 12cR1 / 2 /


18c Linux x86 64를 실행 중입니다. 마이그레이션의 첫 단계로
모든 NonProduction 워크로드를 OCI DB System으로
마이그레이션하고 OnPremise Production에서 OCI로 빈번한
복제를 수행하려고합니다.
선택할 수있는 가장 좋은 마이그레이션 방법은 무엇입니까?

Copyright © 2019 Oracle and/or its affiliates


Method11 : RMAN Active Duplicate

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ Multiple Databases에 FastConnect를 사용하는 ̶ 소스와 타겟은 동일한 패치레벨이 요구됨
최상의 방법
̶ TDE를 사용하는 경우 TDE Wallet 사본과 Auto
̶ 리눅스나 윈도우를 사용하는 OnPremise Login 은 필수
데이터베이스에 사용
̶ 초기부터 마이그레이션 방법 안정화를 위한 노력
이 요구됨

Establish
Prepare Copy TDE
Source for Configure Wallet from
Connectivity
Static Listener Perform
b/w RMAN Active
RMAN Active Source to OnPremise
Duplicate on OCI Target and
DBSystem and OCI Duplicate
(Patch Set) Auto Login
DBSystem

26 Copyright © 2019 Oracle and/or its affiliates


Method12 : RMAN Active Duplicate for PDB

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ Multiple PDB Databases에 FastConnect를 ̶ 소스와 타겟은 동일한 패치레벨이 요구됨
사용하는 최상의 방법
̶ 초기부터 마이그레이션 방법 안정화를 위한 노력
̶ 리눅스나 윈도우를 사용하는 OnPremise 이 요구됨
데이터베이스에 사용
̶ 소스 PDB에는 암호화된 테이블스페이스가
없어야 함

Establish
Prepare
Source for Configure Connectivity Perform
Static Listener Perform Validation of
b/w RMAN Active
RMAN Active OnPremise
Duplicate on OCI PDB on OCI
DBSystem and OCI Duplicate DBSystem
(Patch Set)
DBSystem

27 Copyright © 2019 Oracle and/or its affiliates


Method13 : Unplugging and Plugging a NonCDB

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ NonCDB 마이그레이션 및 콘솔리데이션의 ̶ 데이터베이스가 클수록 다운타임이 증가
간단하면서도 효과적인 방법
̶ PDB 데이터베이스 오픈 전에 모든 플러그인
̶ OnPremise가 Little Endian Family인 경우 사용 Violation 해결 필요
̶ 데이터베이스 콘솔리데이션에 주로 사용
̶ 작은 NonCDB 데이터베이스에 유용함

Open the
NonCDB in Securely Copy Execute
the XML File Invoke NonCDB to Resolve all
Read Only and CREATE PlugIn
Unplug(dbms_ and Datafiles PDB Script for
to OCI PLUGGABLE Cleanup and Violations and
pdb.describe) DATABASE Open the PDB
DBSystem Conversion
to XML File

28 Copyright © 2019 Oracle and/or its affiliates


Method14 : Unplugging and Plugging a PDB

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ 간단하면서도 효과적인 PDB 마이그레이션 방법 ̶ 데이터베이스가 클수록 다운타임이 증가
̶ OnPremise가 Little Endian Family인 경우 사용 ̶ PDB 데이터베이스 오픈 전에 모든 플러그인
̶ 데이터베이스 콘솔리데이션에 주로 사용 Violation 해결 필요
̶ 작은 PDB 데이터베이스에 유용함

Securely Copy
the XML File Invoke
Close the PDB CREATE Resolve all
and Unplug to PlugIn Open the PDB
and Datafiles and Validate
to OCI PLUGGABLE
XML File DATABASE Violations
DBSystem

29 Copyright © 2019 Oracle and/or its affiliates


Cloud Migration Quiz

OnPremise Windows 환경에서 1000개 이상의 작은


NonCDB를 실행하고 있으며, OCI DB System에는
Multitenant 데이터베이스로 구성하고 DBA 공수가 적게
들어가는 방법으로 마이그레이션 및 통합하려고 합니다.
어떤 마이그레이션 방법을 선택 하시겠습니까?

Copyright © 2019 Oracle and/or its affiliates


Method15 : Remote Clone NonCDB

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ OnPremise 데이터베이스가 Little Endian인 경우 ̶ 마이그레이션 동안 NonCDB 는 Read Only 모드
사용
̶ 호환 가능한 캐릭터셋일때 사용 가능
̶ DB Link를 통한 복제
̶ PDB 제한모드를 피하기 위하여 플러그인시
̶ Database Version >= 12.1.0.2 Violation에 대한 주의가 필요
̶ 마이그레이션 방법 안정화 작업

Create Create Execute


Create Source Database Link Pluggable NonCDB to Resolve PlugIn
User, Give Violations and
Pointing to Database PDB SQL
Grants Source CDB NON$CDB Script Open the PDB

31 Copyright © 2019 Oracle and/or its affiliates


Cloud Migration Quiz

OnPremise Linux 환경에서 실행되는 여러 CDB에 1000개


이상의 작은 PDB가 분산되어 있으며, OCI DB System으로 DBA
공수가 적게 들어가는 방법으로 마이그레이션 및 통합하고자
합니다.
어떤 마이그레이션 방법을 선택 하시겠습니까?

Copyright © 2019 Oracle and/or its affiliates


Method16 : Remote Clone PDB

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ OnPremise 데이터베이스가 Little Endian이고 ̶ PDB Closed for Migration
멀티테넌트 DB를 사용하는 경우 사용
̶ 호환 가능한 캐릭터셋일때 사용 가능
̶ DB Link를 통한 복제
̶ PDB 제한모드를 피하기 위하여 PDB 플러그인시
̶ Database Version >= 12.1.0.2 Violation에 대한 주의가 필요
̶ 마이그레이션 방법 안정화 작업

Perform
Update Target
Create Source TNS File with Create Remote Clone
User, Give Database Link Resolve PlugIn
PDB Using Violations and
Source PDB Create
Grants and Connectivity Pointing to
Close the PDB Source PDB Pluggable Open the PDB
String
Database

33 Copyright © 2019 Oracle and/or its affiliates


Cloud Migration Quiz

데이터베이스 크기가 50GB에서 50TB 사이인 Linux 또는


Windows에서 OnPremise Database>= 11.2.0.4를 실행
중입니다. OnPremise의 모든 12c/18c 데이터베이스는
Multitenant입니다. 다운 타임이 거의 없는 OCI DB
시스템으로 가장 안정적인 마이그레이션 방법을 찾고 있습니다.
선택할 수있는 가장 좋은 마이그레이션 방법은 무엇입니까?

Copyright © 2019 Oracle and/or its affiliates


Method17 : Hybrid DataGuard from On-Premise to OCI DB System

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ Near zero downtime ̶ On-Premise Linux/Windows
̶ 가장 널리 사용되는 마이그레이션 방법 ̶ 원활한 마이그레이션을 위해 DR훈련이 중요
̶ DR-to-Cloud 솔루션으로 구현됨, 여러 번의 훈련
후 전환 필요
̶ Database Version >= 11.2.0.4

Prepare RMAN Multiple DR


Establish
Source and Standby Drill for Issue Switchover
Connectivity
Target for Duplicate or Resolution and Fly High
b/w Source
DataGuard Restore from and with OCI
and Target
Setup Service Integrations

35 Copyright © 2019 Oracle and/or its affiliates


Method18 : Golden Gate Real Time Replication

• Use Case 및 특징 • 고려 사항 및 유의할 점


̶ Near zero downtime ̶ 마이그레이션 비용 고려
̶ 가장 널리 사용되는 마이그레이션 방법 ̶ TTS 및 DataPump 활용 가능
̶ Endian Format 변환에 사용
̶ 캐릭터셋 변환에 사용

Prepare
Perform
Source and Perform Switchover
OGG Extract Backup and
Target for OGG Replicat and Fly High
and Pump Recovery
Golden Gate process with OCI
process
Setup

36 Copyright © 2019 Oracle and/or its affiliates


Zero Downtime Migration (ZDM)

• Data Guard를 이용하여 On-Premise 데이터베이스를 OCI, ExaCC, ExaCS 등으로 빠르고 쉽게 무중단 migration을
수행하는 소프트웨어 패키지
• 지원 백업 매체는 OCI Object Storage, ZDLRA, NFS 스토리지
• Database Version >= 11.2.0.4
• OTN에서 다운로드후 설치(zdminstall.sh setup ..), 서비스 수행(zdmservice start)
• Migration Workflow

37 Copyright © 2019 Oracle and/or its affiliates


Migration Methods : Summary

▪ Endian Format 변환 ▪ Reduce DownTime ▪ OnPremise DB 12.1.0.2 이상


✓ Data Pump Conventional Export ✓ RMAN Cross Platform ✓ RMAN Cross Platform
Import Incremental Transportable Transportable PDB
✓ Data Pump Full Transportable Tablespace ✓ RMAN Active Duplicate (PDB)
✓ RMAN Convert Transportable ✓ Hybrid DataGuard from On- ✓ Unplugging and Plugging a
Tablespace with Data Pump Premise to OCI DB System (NonCDB/PDB)
✓ RMAN Cross Platform ✓ Golden Gate Real Time ✓ Remote Clone (NonCDB/PDB)
Incremental Transportable Replication
Tablespace ✓ Zero Downtime Migration(ZDM)
✓ RMAN Cross Platform TTS
Backup Sets

38 Copyright © 2019 Oracle and/or its affiliates


Thank you

Seunghyun Kim
Solution Engineering
Oracle Korea

39 Copyright © 2019 Oracle and/or its affiliates

You might also like