[Pgday.Seoul 2018] 이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG

PgDay.Seoul
PgDay.SeoulPgDay.Seoul
DB2PG
- 비용절감?
- 정책 이슈
- 성능, 기능이슈
- 사용상의 편의성
- Cloud등으로의 환경변화
- 기타 등등 . . .
- Oracle이외의 DB는 어떤 tool로?
- ora2pg의 성능(대용량)
- Perl engineer? NO, java engineer? Yes
- 수작업 ㅠㅠ
- 국가정보자원관리원 Project진행
- 2016. 05월 사내 Project로 시작
- 2017. 03월 Oracle Spatial data 지원
- 2017. 10월 MS-SQL 지원
- 2018. 05월 공개SW 기술개발 지원사업 참여
- 2018. 06월 OpenSource화 결정 및 Github
- 2018. 10월 Oracle, DB2, MS-SQL, Sybase,
Mysql지원
- 제품별 데이터 구조의 호환성
- GIS데이터와 같은 특수한 데이터 변환
- DB별 개성적인 DDL
- Resource 부족(개발자, DBA)
- PostgreSQL 시장확대
- 공개SW 기술개발 지원사업 참여
- 개발자의 참여 유도(능력자필요)
- K4M value up!
[Pgday.Seoul 2018]  이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG
DBMS DDL Extract Data Migration
Oracle Yes Yes
MS-SQL Yes Yes
DB2 Yes
Sybase Yes
Mysql Yes Yes
cubrid, altibase Soon
- Schema
- Tables
- Primary key
- Unique
- Foreign Key
- View
- Sequence
- Index
Github
db2pg /
/ Images /
/ setting / convert_map.json
/ setting / mapper / MetaExtractMapper.xml
/ src/main/java : java source
/db2pg/setting/
1 {
2 "comment": {
3 "postgres": "#",
4 "mysql": [
5 "--"
6 ]
7 },
8 "string": {
9 "postgres": "'",
10 "mysql": [
11 """
12 ]
13 },
14 "classify_string": {
15 "postgres": """,
16 "mysql": [
17 "`"
18 ]
19 },
20 "integer_case_1": {
21 "postgres": "SMALLINT",
22 "mysql": [
23 "^(?i)TINYINTs*(?[0-9]*)s*UNSIGNED?$",
24 "^(?i)SMALLINT$(?[0-9]*)?$",
25 "^(?i)TINYINTs*(?[0-9]*)?$"
26 ],
27 "mss": [
28 "^(?i)TINYINT$"
29 ]
각 DB별
Data Type
변환 방식을
설정
/db2pg/setting/mapper/
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE mapper
3 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
6 <mapper namespace="com.k4m.experdb.db2pg.mapper.MetaExtractMapper">
7
8 <resultMap id="getColumnListResult" type="com.k4m.experdb.db2pg.common.LowerKeyMap">
9 <result property="ORDINAL_POSITION" column="ORDINAL_POSITION" />
10 <result property="COLUMN_NAME" column="COLUMN_NAME" />
11 <result property="COLUMN_TYPE" column="COLUMN_TYPE" />
12 <result property="COLUMN_DEFAULT" column="COLUMN_DEFAULT" jdbcType="VARCHAR" javaType="java.lang.String" />
13 <result property="IS_NULL" column="IS_NULL" />
14 <result property="COLUMN_COMMENT" column="COLUMN_COMMENT" />
15 <result property="NUMERIC_PRECISION" column="NUMERIC_PRECISION" />
16 <result property="NUMERIC_SCALE" column="NUMERIC_SCALE" /> </resultMap>
17
18 <resultMap id="getViewInformResult" type="com.k4m.experdb.db2pg.common.LowerKeyMap">
19 <result property="VIEW_NAME" column="VIEW_NAME" />
20 <result property="TEXT" column="TEXT" jdbcType="VARCHAR" javaType="java.lang.String" />
21 </resultMap>
22
23 <select id="getTableNames" parameterType="map" resultType="java.lang.String" databaseId="ORA">
24 SELECT OBJECT_NAME as TABLE_NAME FROM ALL_OBJECTS
25 WHERE OWNER=#{TABLE_SCHEMA}
26 AND OBJECT_NAME NOT IN ('TOAD_PLAN_TABLE','PLAN_TABLE')
27 AND OBJECT_NAME NOT LIKE 'MDRT%'
28 AND OBJECT_NAME NOT LIKE 'MDXT%'
29 <choose>
각 DBMS별
Object
추출 Query
db2pg.config
위치 : /db2pg/src/main/java/com/k4m/experdb/db2pg/sample/
1 SRC_EXPORT=FALSE
2 PG_CONSTRAINT_EXTRACT=FALSE
3 SRC_DDL_EXPORT=FALSE
4
5 SRC_HOST=
6 SRC_USER=
7 SRC_PASSWORD=
8 SRC_DATABASE=
9 SRC_SCHEMA=
10 SRC_DB_TYPE=ORA
11 SRC_PORT=1521
12 SRC_DB_CHARSET=UTF8
13 SRC_LOB_FETCH_SIZE=1024
14 SRC_STATEMENT_FETCH_SIZE=3000
15 SRC_TABLE_SELECT_PARALLEL=1
16 SRC_TABLE_COPY_SEGMENT_SIZE=3000
17 VERBOSE=TRUE
18 #SRC_WHERE=
19 TABLE_ONLY=TRUE
20 TRUNCATE=FALSE
21 #SRC_ALLOW_TABLES=
22 #SRC_EXCLUDE_TABLES=
23 #SRC_ROWNUM=
24 TAR_HOST=
25 TAR_USER=
26 TAR_PASSWORD=
27 TAR_DATABASE=
28 TAR_SCHEMA=
29 TAR_PORT=
Source
및
Target의
Connection
info
queries.xml
위치 : /db2pg/src/main/java/com/k4m/experdb/db2pg/sample/
1 <QUERIES>
2 <QUERY>
3 <NAME></NAME>
4 <SELECT>
5 </SELECT>
6 </QUERY>
7 </QUERIES>
Query를 이용한 Migration시 설정
ora2pg vs DB2PG
ora2pg db2pg
Language perl java
Multi thread Import NO YES
DB to DB Migration NO YES
Data type Mapping file NO YES
Support DBMS 1+1(mysql) 5
DB2PG fast than ora2pg at lease 2
GPL v3
https://github.com/experdb/eXperDB-DB2PG
facebook : https://www.facebook.com/experdb
naver cafe : http://cafe.naver.com/psqlmaster
[Pgday.Seoul 2018]  이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG
- Support Partition table
- cubrid data migration
- altibase data migration
- Everything you want!!(wish)
능력자분들의 많은 참여 부탁 드립니다.
Q & A
1 of 20

Recommended

PostgreSQL 튜닝워크샵 (2017년8월) by
PostgreSQL 튜닝워크샵 (2017년8월)PostgreSQL 튜닝워크샵 (2017년8월)
PostgreSQL 튜닝워크샵 (2017년8월)DBdemy
10.9K views207 slides
[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL by
[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQL
[Pgday.Seoul 2021] 1. 예제로 살펴보는 포스트그레스큐엘의 독특한 SQLPgDay.Seoul
420 views20 slides
Mvcc in postgreSQL 권건우 by
Mvcc in postgreSQL 권건우Mvcc in postgreSQL 권건우
Mvcc in postgreSQL 권건우PgDay.Seoul
3.7K views42 slides
[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱 by
[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱
[Pgday.Seoul 2017] 2. PostgreSQL을 위한 리눅스 커널 최적화 - 김상욱PgDay.Seoul
931 views62 slides
[Pgday.Seoul 2020] SQL Tuning by
[Pgday.Seoul 2020] SQL Tuning[Pgday.Seoul 2020] SQL Tuning
[Pgday.Seoul 2020] SQL TuningPgDay.Seoul
1.2K views44 slides
PostgreSQL 공간관리 살펴보기 이근오 by
PostgreSQL 공간관리 살펴보기 이근오PostgreSQL 공간관리 살펴보기 이근오
PostgreSQL 공간관리 살펴보기 이근오PgDay.Seoul
2.1K views45 slides

More Related Content

What's hot

[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정 by
[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정
[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정PgDay.Seoul
187 views33 slides
PostgreSQL Deep Internal by
PostgreSQL Deep InternalPostgreSQL Deep Internal
PostgreSQL Deep InternalEXEM
2.5K views134 slides
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱 by
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱PgDay.Seoul
178 views30 slides
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오 by
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오PgDay.Seoul
1.4K views29 slides
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스 by
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스PgDay.Seoul
1.4K views29 slides
Introduction VAUUM, Freezing, XID wraparound by
Introduction VAUUM, Freezing, XID wraparoundIntroduction VAUUM, Freezing, XID wraparound
Introduction VAUUM, Freezing, XID wraparoundMasahiko Sawada
2.3K views42 slides

What's hot(20)

[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정 by PgDay.Seoul
[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정
[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정
PgDay.Seoul187 views
PostgreSQL Deep Internal by EXEM
PostgreSQL Deep InternalPostgreSQL Deep Internal
PostgreSQL Deep Internal
EXEM2.5K views
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱 by PgDay.Seoul
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱
PgDay.Seoul178 views
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오 by PgDay.Seoul
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
PgDay.Seoul1.4K views
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스 by PgDay.Seoul
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
PgDay.Seoul1.4K views
Introduction VAUUM, Freezing, XID wraparound by Masahiko Sawada
Introduction VAUUM, Freezing, XID wraparoundIntroduction VAUUM, Freezing, XID wraparound
Introduction VAUUM, Freezing, XID wraparound
Masahiko Sawada2.3K views
[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization by PgDay.Seoul
[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization
[Pgday.Seoul 2021] 2. Porting Oracle UDF and Optimization
PgDay.Seoul238 views
[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우 by PgDay.Seoul
[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우
[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우
PgDay.Seoul4.5K views
Introduction to Vacuum Freezing and XID by PGConf APAC
Introduction to Vacuum Freezing and XIDIntroduction to Vacuum Freezing and XID
Introduction to Vacuum Freezing and XID
PGConf APAC5.4K views
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015 by PostgreSQL-Consulting
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
How does PostgreSQL work with disks: a DBA's checklist in detail. PGConf.US 2015
[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기 by PgDay.Seoul
[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기
[Pgday.Seoul 2017] 8. PostgreSQL 10 새기능 소개 - 김상기
PgDay.Seoul3.1K views
Pgday bdr 천정대 by PgDay.Seoul
Pgday bdr 천정대Pgday bdr 천정대
Pgday bdr 천정대
PgDay.Seoul1.6K views
PostgreSQL Internals (1) for PostgreSQL 9.6 (English) by Noriyoshi Shinoda
PostgreSQL Internals (1) for PostgreSQL 9.6 (English)PostgreSQL Internals (1) for PostgreSQL 9.6 (English)
PostgreSQL Internals (1) for PostgreSQL 9.6 (English)
Noriyoshi Shinoda2.4K views
Deep dive into PostgreSQL statistics. by Alexey Lesovsky
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.
Alexey Lesovsky22.9K views
Spark 의 핵심은 무엇인가? RDD! (RDD paper review) by Yongho Ha
Spark 의 핵심은 무엇인가? RDD! (RDD paper review)Spark 의 핵심은 무엇인가? RDD! (RDD paper review)
Spark 의 핵심은 무엇인가? RDD! (RDD paper review)
Yongho Ha87.2K views
PostgreSQL WAL for DBAs by PGConf APAC
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs
PGConf APAC4.6K views
Oracleのトランケートについて知っておくべきこと by Kazuhiro Takahashi
Oracleのトランケートについて知っておくべきことOracleのトランケートについて知っておくべきこと
Oracleのトランケートについて知っておくべきこと
Kazuhiro Takahashi3.8K views
MongoDB Configパラメータ解説 by Shoken Fujisaki
MongoDB Configパラメータ解説MongoDB Configパラメータ解説
MongoDB Configパラメータ解説
Shoken Fujisaki32.2K views

Similar to [Pgday.Seoul 2018] 이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG

Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka by
Solutions for bi-directional Integration between Oracle RDMBS & Apache KafkaSolutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache KafkaGuido Schmutz
575 views50 slides
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk... by
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...confluent
1.7K views50 slides
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka by
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaSolutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaGuido Schmutz
870 views51 slides
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database by
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph DatabaseBringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph DatabaseJimmy Angelakos
4.8K views22 slides
Guacamole by
GuacamoleGuacamole
GuacamoleArangoDB Database
1.5K views57 slides
Getting Started with DrupalGap by
Getting Started with DrupalGapGetting Started with DrupalGap
Getting Started with DrupalGapAlex S
12.1K views26 slides

Similar to [Pgday.Seoul 2018] 이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG(20)

Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka by Guido Schmutz
Solutions for bi-directional Integration between Oracle RDMBS & Apache KafkaSolutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
Guido Schmutz575 views
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk... by confluent
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
confluent1.7K views
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka by Guido Schmutz
Solutions for bi-directional integration between Oracle RDBMS & Apache KafkaSolutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
Guido Schmutz870 views
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database by Jimmy Angelakos
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph DatabaseBringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
Jimmy Angelakos4.8K views
Getting Started with DrupalGap by Alex S
Getting Started with DrupalGapGetting Started with DrupalGap
Getting Started with DrupalGap
Alex S12.1K views
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016 by ICS User Group
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
ICS User Group407 views
A Tale of Three Apache Spark APIs: RDDs, DataFrames and Datasets by Jules Damji by Data Con LA
A Tale of Three Apache Spark APIs: RDDs, DataFrames and Datasets by Jules DamjiA Tale of Three Apache Spark APIs: RDDs, DataFrames and Datasets by Jules Damji
A Tale of Three Apache Spark APIs: RDDs, DataFrames and Datasets by Jules Damji
Data Con LA694 views
Spark streaming , Spark SQL by Yousun Jeong
Spark streaming , Spark SQLSpark streaming , Spark SQL
Spark streaming , Spark SQL
Yousun Jeong1.4K views
Everything is Awesome - Cutting the Corners off the Web by James Rakich
Everything is Awesome - Cutting the Corners off the WebEverything is Awesome - Cutting the Corners off the Web
Everything is Awesome - Cutting the Corners off the Web
James Rakich544 views
An Introduction to Spark by jlacefie
An Introduction to SparkAn Introduction to Spark
An Introduction to Spark
jlacefie3K views
An Introduct to Spark - Atlanta Spark Meetup by jlacefie
An Introduct to Spark - Atlanta Spark MeetupAn Introduct to Spark - Atlanta Spark Meetup
An Introduct to Spark - Atlanta Spark Meetup
jlacefie1.4K views
Getting Started with Geospatial Data in MongoDB by MongoDB
Getting Started with Geospatial Data in MongoDBGetting Started with Geospatial Data in MongoDB
Getting Started with Geospatial Data in MongoDB
MongoDB9.5K views
Apache Spark Overview part1 (20161107) by Steve Min
Apache Spark Overview part1 (20161107)Apache Spark Overview part1 (20161107)
Apache Spark Overview part1 (20161107)
Steve Min1.1K views
Apache Con Us2007 Apachei Batis by day
Apache Con Us2007 Apachei BatisApache Con Us2007 Apachei Batis
Apache Con Us2007 Apachei Batis
day873 views
Building mobile applications with DrupalGap by Alex S
Building mobile applications with DrupalGapBuilding mobile applications with DrupalGap
Building mobile applications with DrupalGap
Alex S16.7K views
WebNet Conference 2012 - Designing complex applications using html5 and knock... by Fabio Franzini
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini1.6K views
SparkR - Play Spark Using R (20160909 HadoopCon) by wqchen
SparkR - Play Spark Using R (20160909 HadoopCon)SparkR - Play Spark Using R (20160909 HadoopCon)
SparkR - Play Spark Using R (20160909 HadoopCon)
wqchen2.1K views
Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece by CoLab Athens
Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece
Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece
CoLab Athens1.7K views

More from PgDay.Seoul

[pgday.Seoul 2022] PostgreSQL with Google Cloud by
[pgday.Seoul 2022] PostgreSQL with Google Cloud[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google CloudPgDay.Seoul
218 views49 slides
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기 by
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기PgDay.Seoul
498 views17 slides
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기 by
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기PgDay.Seoul
940 views40 slides
[Pgday.Seoul 2019] Advanced FDW by
[Pgday.Seoul 2019] Advanced FDW[Pgday.Seoul 2019] Advanced FDW
[Pgday.Seoul 2019] Advanced FDWPgDay.Seoul
412 views30 slides
[Pgday.Seoul 2018] PostgreSQL 11 새 기능 소개 by
[Pgday.Seoul 2018]  PostgreSQL 11 새 기능 소개[Pgday.Seoul 2018]  PostgreSQL 11 새 기능 소개
[Pgday.Seoul 2018] PostgreSQL 11 새 기능 소개PgDay.Seoul
3K views13 slides
[Pgday.Seoul 2018] PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha by
[Pgday.Seoul 2018]  PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha[Pgday.Seoul 2018]  PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha
[Pgday.Seoul 2018] PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposhaPgDay.Seoul
1.1K views37 slides

More from PgDay.Seoul(16)

[pgday.Seoul 2022] PostgreSQL with Google Cloud by PgDay.Seoul
[pgday.Seoul 2022] PostgreSQL with Google Cloud[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google Cloud
PgDay.Seoul218 views
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기 by PgDay.Seoul
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기
[Pgday.Seoul 2020] 포스트그레스큐엘 자국어화 이야기
PgDay.Seoul498 views
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기 by PgDay.Seoul
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기
[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기
PgDay.Seoul940 views
[Pgday.Seoul 2019] Advanced FDW by PgDay.Seoul
[Pgday.Seoul 2019] Advanced FDW[Pgday.Seoul 2019] Advanced FDW
[Pgday.Seoul 2019] Advanced FDW
PgDay.Seoul412 views
[Pgday.Seoul 2018] PostgreSQL 11 새 기능 소개 by PgDay.Seoul
[Pgday.Seoul 2018]  PostgreSQL 11 새 기능 소개[Pgday.Seoul 2018]  PostgreSQL 11 새 기능 소개
[Pgday.Seoul 2018] PostgreSQL 11 새 기능 소개
PgDay.Seoul3K views
[Pgday.Seoul 2018] PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha by PgDay.Seoul
[Pgday.Seoul 2018]  PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha[Pgday.Seoul 2018]  PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha
[Pgday.Seoul 2018] PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha
PgDay.Seoul1.1K views
[Pgday.Seoul 2018] PostgreSQL Authentication with FreeIPA by PgDay.Seoul
[Pgday.Seoul 2018]  PostgreSQL Authentication with FreeIPA[Pgday.Seoul 2018]  PostgreSQL Authentication with FreeIPA
[Pgday.Seoul 2018] PostgreSQL Authentication with FreeIPA
PgDay.Seoul786 views
[Pgday.Seoul 2018] AWS Cloud 환경에서 PostgreSQL 구축하기 by PgDay.Seoul
[Pgday.Seoul 2018]  AWS Cloud 환경에서 PostgreSQL 구축하기[Pgday.Seoul 2018]  AWS Cloud 환경에서 PostgreSQL 구축하기
[Pgday.Seoul 2018] AWS Cloud 환경에서 PostgreSQL 구축하기
PgDay.Seoul1.2K views
[Pgday.Seoul 2018] Greenplum의 노드 분산 설계 by PgDay.Seoul
[Pgday.Seoul 2018]  Greenplum의 노드 분산 설계[Pgday.Seoul 2018]  Greenplum의 노드 분산 설계
[Pgday.Seoul 2018] Greenplum의 노드 분산 설계
PgDay.Seoul1.6K views
[Pgday.Seoul 2018] replacing oracle with edb postgres by PgDay.Seoul
[Pgday.Seoul 2018] replacing oracle with edb postgres[Pgday.Seoul 2018] replacing oracle with edb postgres
[Pgday.Seoul 2018] replacing oracle with edb postgres
PgDay.Seoul606 views
[Pgday.Seoul 2017] 5. 테드폴허브(올챙이) PostgreSQL 확장하기 - 조현종 by PgDay.Seoul
[Pgday.Seoul 2017] 5. 테드폴허브(올챙이) PostgreSQL 확장하기 - 조현종[Pgday.Seoul 2017] 5. 테드폴허브(올챙이) PostgreSQL 확장하기 - 조현종
[Pgday.Seoul 2017] 5. 테드폴허브(올챙이) PostgreSQL 확장하기 - 조현종
PgDay.Seoul434 views
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진 by PgDay.Seoul
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진
PgDay.Seoul2.4K views
[Pgday.Seoul 2017] 4. Composite Type/JSON 파라미터를 활용한 TVP구현(with C#, JAVA) - 지현명 by PgDay.Seoul
[Pgday.Seoul 2017] 4. Composite Type/JSON 파라미터를 활용한 TVP구현(with C#, JAVA) - 지현명[Pgday.Seoul 2017] 4. Composite Type/JSON 파라미터를 활용한 TVP구현(with C#, JAVA) - 지현명
[Pgday.Seoul 2017] 4. Composite Type/JSON 파라미터를 활용한 TVP구현(with C#, JAVA) - 지현명
PgDay.Seoul572 views
PostgreSQL 9.6 새 기능 소개 by PgDay.Seoul
PostgreSQL 9.6 새 기능 소개PostgreSQL 9.6 새 기능 소개
PostgreSQL 9.6 새 기능 소개
PgDay.Seoul3.2K views
pg_hba.conf 이야기 by PgDay.Seoul
pg_hba.conf 이야기pg_hba.conf 이야기
pg_hba.conf 이야기
PgDay.Seoul831 views
Pg report 20161010_02 by PgDay.Seoul
Pg report 20161010_02Pg report 20161010_02
Pg report 20161010_02
PgDay.Seoul342 views

Recently uploaded

Consulting for Data Monetization Maximizing the Profit Potential of Your Data... by
Consulting for Data Monetization Maximizing the Profit Potential of Your Data...Consulting for Data Monetization Maximizing the Profit Potential of Your Data...
Consulting for Data Monetization Maximizing the Profit Potential of Your Data...Flexsin
15 views10 slides
Best Mics For Your Live Streaming by
Best Mics For Your Live StreamingBest Mics For Your Live Streaming
Best Mics For Your Live Streamingontheflystream
6 views6 slides
Roadmap y Novedades de producto by
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de productoNeo4j
43 views33 slides
How to Make the Most of Regression and Unit Testing.pdf by
How to Make the Most of Regression and Unit Testing.pdfHow to Make the Most of Regression and Unit Testing.pdf
How to Make the Most of Regression and Unit Testing.pdfAbhay Kumar
10 views9 slides
El Arte de lo Possible by
El Arte de lo PossibleEl Arte de lo Possible
El Arte de lo PossibleNeo4j
34 views35 slides
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon by
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - AfternoonDSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - AfternoonDeltares
11 views43 slides

Recently uploaded(20)

Consulting for Data Monetization Maximizing the Profit Potential of Your Data... by Flexsin
Consulting for Data Monetization Maximizing the Profit Potential of Your Data...Consulting for Data Monetization Maximizing the Profit Potential of Your Data...
Consulting for Data Monetization Maximizing the Profit Potential of Your Data...
Flexsin 15 views
Roadmap y Novedades de producto by Neo4j
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de producto
Neo4j43 views
How to Make the Most of Regression and Unit Testing.pdf by Abhay Kumar
How to Make the Most of Regression and Unit Testing.pdfHow to Make the Most of Regression and Unit Testing.pdf
How to Make the Most of Regression and Unit Testing.pdf
Abhay Kumar10 views
El Arte de lo Possible by Neo4j
El Arte de lo PossibleEl Arte de lo Possible
El Arte de lo Possible
Neo4j34 views
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon by Deltares
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - AfternoonDSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
Deltares11 views
Advanced API Mocking Techniques by Dimpy Adhikary
Advanced API Mocking TechniquesAdvanced API Mocking Techniques
Advanced API Mocking Techniques
Dimpy Adhikary18 views
How to Install and Activate Email-Researcher by eGrabber
How to Install and Activate Email-ResearcherHow to Install and Activate Email-Researcher
How to Install and Activate Email-Researcher
eGrabber19 views
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge... by Deltares
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
Deltares16 views
Neo4j : Graphes de Connaissance, IA et LLMs by Neo4j
Neo4j : Graphes de Connaissance, IA et LLMsNeo4j : Graphes de Connaissance, IA et LLMs
Neo4j : Graphes de Connaissance, IA et LLMs
Neo4j46 views
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea... by Safe Software
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...
Geospatial Synergy: Amplifying Efficiency with FME & Esri ft. Peak Guest Spea...
Safe Software391 views
Les nouveautés produit Neo4j by Neo4j
 Les nouveautés produit Neo4j Les nouveautés produit Neo4j
Les nouveautés produit Neo4j
Neo4j27 views
A first look at MariaDB 11.x features and ideas on how to use them by Federico Razzoli
A first look at MariaDB 11.x features and ideas on how to use themA first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use them
Federico Razzoli44 views
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove... by Deltares
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...
Deltares15 views
Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ... by marksimpsongw
Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...
Mark Simpson - UKOUG23 - Refactoring Monolithic Oracle Database Applications ...
marksimpsongw74 views
SUGCON ANZ Presentation V2.1 Final.pptx by Jack Spektor
SUGCON ANZ Presentation V2.1 Final.pptxSUGCON ANZ Presentation V2.1 Final.pptx
SUGCON ANZ Presentation V2.1 Final.pptx
Jack Spektor21 views
Software testing company in India.pptx by SakshiPatel82
Software testing company in India.pptxSoftware testing company in India.pptx
Software testing company in India.pptx
SakshiPatel827 views

[Pgday.Seoul 2018] 이기종 DB에서 PostgreSQL로의 Migration을 위한 DB2PG

  • 2. - 비용절감? - 정책 이슈 - 성능, 기능이슈 - 사용상의 편의성 - Cloud등으로의 환경변화 - 기타 등등 . . .
  • 3. - Oracle이외의 DB는 어떤 tool로? - ora2pg의 성능(대용량) - Perl engineer? NO, java engineer? Yes - 수작업 ㅠㅠ - 국가정보자원관리원 Project진행
  • 4. - 2016. 05월 사내 Project로 시작 - 2017. 03월 Oracle Spatial data 지원 - 2017. 10월 MS-SQL 지원 - 2018. 05월 공개SW 기술개발 지원사업 참여 - 2018. 06월 OpenSource화 결정 및 Github - 2018. 10월 Oracle, DB2, MS-SQL, Sybase, Mysql지원
  • 5. - 제품별 데이터 구조의 호환성 - GIS데이터와 같은 특수한 데이터 변환 - DB별 개성적인 DDL - Resource 부족(개발자, DBA)
  • 6. - PostgreSQL 시장확대 - 공개SW 기술개발 지원사업 참여 - 개발자의 참여 유도(능력자필요) - K4M value up!
  • 8. DBMS DDL Extract Data Migration Oracle Yes Yes MS-SQL Yes Yes DB2 Yes Sybase Yes Mysql Yes Yes cubrid, altibase Soon
  • 9. - Schema - Tables - Primary key - Unique - Foreign Key - View - Sequence - Index
  • 10. Github db2pg / / Images / / setting / convert_map.json / setting / mapper / MetaExtractMapper.xml / src/main/java : java source
  • 11. /db2pg/setting/ 1 { 2 "comment": { 3 "postgres": "#", 4 "mysql": [ 5 "--" 6 ] 7 }, 8 "string": { 9 "postgres": "'", 10 "mysql": [ 11 """ 12 ] 13 }, 14 "classify_string": { 15 "postgres": """, 16 "mysql": [ 17 "`" 18 ] 19 }, 20 "integer_case_1": { 21 "postgres": "SMALLINT", 22 "mysql": [ 23 "^(?i)TINYINTs*(?[0-9]*)s*UNSIGNED?$", 24 "^(?i)SMALLINT$(?[0-9]*)?$", 25 "^(?i)TINYINTs*(?[0-9]*)?$" 26 ], 27 "mss": [ 28 "^(?i)TINYINT$" 29 ] 각 DB별 Data Type 변환 방식을 설정
  • 12. /db2pg/setting/mapper/ 1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE mapper 3 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 4 "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> 5 6 <mapper namespace="com.k4m.experdb.db2pg.mapper.MetaExtractMapper"> 7 8 <resultMap id="getColumnListResult" type="com.k4m.experdb.db2pg.common.LowerKeyMap"> 9 <result property="ORDINAL_POSITION" column="ORDINAL_POSITION" /> 10 <result property="COLUMN_NAME" column="COLUMN_NAME" /> 11 <result property="COLUMN_TYPE" column="COLUMN_TYPE" /> 12 <result property="COLUMN_DEFAULT" column="COLUMN_DEFAULT" jdbcType="VARCHAR" javaType="java.lang.String" /> 13 <result property="IS_NULL" column="IS_NULL" /> 14 <result property="COLUMN_COMMENT" column="COLUMN_COMMENT" /> 15 <result property="NUMERIC_PRECISION" column="NUMERIC_PRECISION" /> 16 <result property="NUMERIC_SCALE" column="NUMERIC_SCALE" /> </resultMap> 17 18 <resultMap id="getViewInformResult" type="com.k4m.experdb.db2pg.common.LowerKeyMap"> 19 <result property="VIEW_NAME" column="VIEW_NAME" /> 20 <result property="TEXT" column="TEXT" jdbcType="VARCHAR" javaType="java.lang.String" /> 21 </resultMap> 22 23 <select id="getTableNames" parameterType="map" resultType="java.lang.String" databaseId="ORA"> 24 SELECT OBJECT_NAME as TABLE_NAME FROM ALL_OBJECTS 25 WHERE OWNER=#{TABLE_SCHEMA} 26 AND OBJECT_NAME NOT IN ('TOAD_PLAN_TABLE','PLAN_TABLE') 27 AND OBJECT_NAME NOT LIKE 'MDRT%' 28 AND OBJECT_NAME NOT LIKE 'MDXT%' 29 <choose> 각 DBMS별 Object 추출 Query
  • 13. db2pg.config 위치 : /db2pg/src/main/java/com/k4m/experdb/db2pg/sample/ 1 SRC_EXPORT=FALSE 2 PG_CONSTRAINT_EXTRACT=FALSE 3 SRC_DDL_EXPORT=FALSE 4 5 SRC_HOST= 6 SRC_USER= 7 SRC_PASSWORD= 8 SRC_DATABASE= 9 SRC_SCHEMA= 10 SRC_DB_TYPE=ORA 11 SRC_PORT=1521 12 SRC_DB_CHARSET=UTF8 13 SRC_LOB_FETCH_SIZE=1024 14 SRC_STATEMENT_FETCH_SIZE=3000 15 SRC_TABLE_SELECT_PARALLEL=1 16 SRC_TABLE_COPY_SEGMENT_SIZE=3000 17 VERBOSE=TRUE 18 #SRC_WHERE= 19 TABLE_ONLY=TRUE 20 TRUNCATE=FALSE 21 #SRC_ALLOW_TABLES= 22 #SRC_EXCLUDE_TABLES= 23 #SRC_ROWNUM= 24 TAR_HOST= 25 TAR_USER= 26 TAR_PASSWORD= 27 TAR_DATABASE= 28 TAR_SCHEMA= 29 TAR_PORT= Source 및 Target의 Connection info
  • 14. queries.xml 위치 : /db2pg/src/main/java/com/k4m/experdb/db2pg/sample/ 1 <QUERIES> 2 <QUERY> 3 <NAME></NAME> 4 <SELECT> 5 </SELECT> 6 </QUERY> 7 </QUERIES> Query를 이용한 Migration시 설정
  • 15. ora2pg vs DB2PG ora2pg db2pg Language perl java Multi thread Import NO YES DB to DB Migration NO YES Data type Mapping file NO YES Support DBMS 1+1(mysql) 5 DB2PG fast than ora2pg at lease 2
  • 19. - Support Partition table - cubrid data migration - altibase data migration - Everything you want!!(wish) 능력자분들의 많은 참여 부탁 드립니다.
  • 20. Q & A