SlideShare a Scribd company logo
1 of 20
Download to read offline
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!
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
- Support Partition table
- cubrid data migration
- altibase data migration
- Everything you want!!(wish)
능력자분들의 많은 참여 부탁 드립니다.
Q & A

More Related Content

What's hot

What's hot (20)

[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정
[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정
[pgday.Seoul 2022] 서비스개편시 PostgreSQL 도입기 - 진소린 & 김태정
 
[pgday.Seoul 2022] PostgreSQL구조 - 윤성재
[pgday.Seoul 2022] PostgreSQL구조 - 윤성재[pgday.Seoul 2022] PostgreSQL구조 - 윤성재
[pgday.Seoul 2022] PostgreSQL구조 - 윤성재
 
Pgday bdr 천정대
Pgday bdr 천정대Pgday bdr 천정대
Pgday bdr 천정대
 
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱
[pgday.Seoul 2022] POSTGRES 테스트코드로 기여하기 - 이동욱
 
PostgreSQL Deep Internal
PostgreSQL Deep InternalPostgreSQL Deep Internal
PostgreSQL Deep Internal
 
Introduction VAUUM, Freezing, XID wraparound
Introduction VAUUM, Freezing, XID wraparoundIntroduction VAUUM, Freezing, XID wraparound
Introduction VAUUM, Freezing, XID wraparound
 
[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우
[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우
[Pgday.Seoul 2017] 6. GIN vs GiST 인덱스 이야기 - 박진우
 
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
[Pgday.Seoul 2019] Citus를 이용한 분산 데이터베이스
 
MySQL_SQL_Tunning_v0.1.3.docx
MySQL_SQL_Tunning_v0.1.3.docxMySQL_SQL_Tunning_v0.1.3.docx
MySQL_SQL_Tunning_v0.1.3.docx
 
[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google Cloud[pgday.Seoul 2022] PostgreSQL with Google Cloud
[pgday.Seoul 2022] PostgreSQL with Google Cloud
 
[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 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
 
Neo4J 사용
Neo4J 사용Neo4J 사용
Neo4J 사용
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
 
TiDB Introduction
TiDB IntroductionTiDB Introduction
TiDB Introduction
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바
 
Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easy
 
Maxscale 소개 1.1.1
Maxscale 소개 1.1.1Maxscale 소개 1.1.1
Maxscale 소개 1.1.1
 
Introduction to Cassandra Architecture
Introduction to Cassandra ArchitectureIntroduction to Cassandra Architecture
Introduction to Cassandra Architecture
 
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
 
Postgresql database administration volume 1
Postgresql database administration volume 1Postgresql database administration volume 1
Postgresql database administration volume 1
 

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

Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
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 Schmutz
 
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...
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
confluent
 
An Introduction to Spark
An Introduction to SparkAn Introduction to Spark
An Introduction to Spark
jlacefie
 
Apache Con Us2007 Apachei Batis
Apache Con Us2007 Apachei BatisApache Con Us2007 Apachei Batis
Apache Con Us2007 Apachei Batis
day
 
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...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
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
Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece
CoLab Athens
 

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

Solutions for bi-directional Integration between Oracle RDMBS & Apache Kafka
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
 
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...
Solutions for bi-directional integration between Oracle RDBMS and Apache Kafk...
 
Solutions for bi-directional integration between Oracle RDBMS & Apache Kafka
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
 
Bringing the Semantic Web closer to reality: PostgreSQL as RDF Graph Database
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
 
Guacamole
GuacamoleGuacamole
Guacamole
 
Getting Started with DrupalGap
Getting Started with DrupalGapGetting Started with DrupalGap
Getting Started with DrupalGap
 
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
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
 
A 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 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
 
Spark streaming , Spark SQL
Spark streaming , Spark SQLSpark streaming , Spark SQL
Spark streaming , Spark SQL
 
Everything is Awesome - Cutting the Corners off the Web
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
 
NoSQL meets Microservices - Michael Hackstein
NoSQL meets Microservices -  Michael HacksteinNoSQL meets Microservices -  Michael Hackstein
NoSQL meets Microservices - Michael Hackstein
 
An Introduction to Spark
An Introduction to SparkAn Introduction to Spark
An Introduction to Spark
 
An Introduct to Spark - Atlanta Spark Meetup
An Introduct to Spark - Atlanta Spark MeetupAn Introduct to Spark - Atlanta Spark Meetup
An Introduct to Spark - Atlanta Spark Meetup
 
Getting Started with Geospatial Data in MongoDB
Getting Started with Geospatial Data in MongoDBGetting Started with Geospatial Data in MongoDB
Getting Started with Geospatial Data in MongoDB
 
Apache Spark Overview part1 (20161107)
Apache Spark Overview part1 (20161107)Apache Spark Overview part1 (20161107)
Apache Spark Overview part1 (20161107)
 
Apache Con Us2007 Apachei Batis
Apache Con Us2007 Apachei BatisApache Con Us2007 Apachei Batis
Apache Con Us2007 Apachei Batis
 
Building mobile applications with DrupalGap
Building mobile applications with DrupalGapBuilding mobile applications with DrupalGap
Building mobile applications with DrupalGap
 
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...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
SparkR - Play Spark Using R (20160909 HadoopCon)
SparkR - Play Spark Using R (20160909 HadoopCon)SparkR - Play Spark Using R (20160909 HadoopCon)
SparkR - Play Spark Using R (20160909 HadoopCon)
 
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
Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece
 

More from PgDay.Seoul

More from PgDay.Seoul (15)

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

Recently uploaded

%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 

Recently uploaded (20)

Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 

[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!
  • 7.
  • 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
  • 18.
  • 19. - Support Partition table - cubrid data migration - altibase data migration - Everything you want!!(wish) 능력자분들의 많은 참여 부탁 드립니다.
  • 20. Q & A