SlideShare a Scribd company logo
1 of 32
Download to read offline
Dbvisit replicate: logical replication made easy 
Infrastructure at your Service. 
Dbvisit replicate: 
logical replication made easy
Dbvisit replicate: logical replication made easy 07.11.2014 
Infrastructure at your Service. 
About me 
Page 2 
Franck Pachot 
Senior consultant 
Oracle Technology Leader 
Mobile +41 79 963 27 22franck.pachot@dbi-services.comwww.dbi-services.com 
Presentations, Articles, blogs, forums
Dbvisit replicate: logical replication made easy 
Experts At Your Service 
>35 specialists in IT infrastructure 
>Certified, experienced, passionate 
Based In Switzerland 
>100% self-financed Swiss company 
>Over CHF 4 mio. turnover 
Leading In Infrastructure Services 
>More than 100 customers in CH, D, & F 
>Over 30 SLAs dbi FlexServicecontracted 
07.11.2014 
dbiservices 
Who we are 
Page 3
Dbvisit replicate: logical replication made easy 
1.Why logical replication? 
2.Demo (setup) 
3.Configuration alternatives 
4.Demo (run) 
5.Why Dbvisit? 
07.11.2014 
Agenda 
Page 4
Dbvisit replicate: logical replication made easy 
Logical vs. Physical 
07.11.2014 
Why Logical replication 
Page 5 
REDO 
DB 
SQL 
statements 
REDO LOG 
records 
REDO LOG 
records 
Applied on tables 
Applied on files 
Applied on files 
APPLY 
Physical replication 
>Redo based 
>Oracle EE or Dbvisitstandby 
redo 
redo
Dbvisit replicate: logical replication made easy 
Logical vs. Physical 
07.11.2014 
Why Logical replication 
Page 6 
REDO 
DB 
SQL 
statements 
REDO LOG 
records 
REDO LOG 
records 
Applied on tables 
Applied on files 
Applied on files 
SQL 
statements 
Applied on tables 
APPLY 
trigger 
mviewlog 
sql 
Logical replication 
>Application based 
>Oracle Streams
Dbvisit replicate: logical replication made easy 
Logical vs. Physical 
07.11.2014 
Why Logical replication 
Page 7 
REDO 
DB 
REDO LOG 
records 
Applied on tables 
Applied on files 
Applied on files 
SQL 
statements 
Applied on tables 
sql 
Logical replication 
>Redo based 
>Golden Gate or Dbvisitreplicate 
SQL 
statements 
MINE 
redo 
REDO LOG 
records 
APPLY
Dbvisit replicate: logical replication made easy 
Physical replication 
>High performance, exact copy (HA) 
>Same version (platform, database, application) 
>No filter or transformation (same tables, columns, indexes, partitions) 
>Oracle Data Guard (EE), Dbvisitstandby, Manual standby and scripts 
Logical replication based on redo 
>More complex (supported datatypes, conflict resolution) 
>Destination can differ (version, data model, data) 
>We choose what we replicate (filter, change deletes to inserts) 
>Destination is Read-Write, can be 2-ways 
>Oracle Golden Gate, Dbvisitreplicate, Streams 
Logical vs. Physical 
07.11.2014 
Why Logical replication 
Page 8
Dbvisit replicate: logical replication made easy 
Offloaded query environments 
>Reporting, Data Quality 
Distributed databases 
>local proxies replicated to master 
Data warehousing and Audit 
>Extract data for ETL, can be real time 
Audit 
>Stores all modifications (old an new values) 
Migration projects 
>Oracle Edition downgrade (go to Standard Edition) 
>Oracle upgrades, OS platform, to the Cloud, etc. 
>11g to PDB (without non_cdb_to_pdb.sql) 
What are the use cases? 
07.11.2014 
Why logical replication 
Page 9
Dbvisit replicate: logical replication made easy 
1.Why logical replication 
2.Demo (setup) 
3.Configuration alternatives 
4.Demo (run) 
5.Why Dbvisit? 
07.11.2014 
Agenda 
Page 10
Dbvisit replicate: logical replication made easy 
http://www.dbvisit.com/repattack/ 
07.11.2014 
Demo (setup) 
Page 11
Dbvisit replicate: logical replication made easy 
Two VirtualBoxVM: 
>source 
>Linux Centos 6.5, Oracle XE 11g with XE database 
>Swingbenchschema, data and application 
>target 
>Linux Centos 6.5, Oracle XE 11g with XE database (empty) 
Downloaded and installed dbvrepon both machines 
>As root, on source and target: 
>Run wizard: http://screencast-o-matic.com/u/nTb6/dbvisit-repattack-setup 
Demo environment 
07.11.2014 
Demo (setup) 
Page 12 
root@source# rpm -ivhdbvisit_replicate-2.7.06-1.x86_64.rpm 
oracle@source# dbvrep 
Dbvrep> setup wizard
Dbvisit replicate: logical replication made easy 
Setup wizard and initialization 
07.11.2014 
Demo (setup) 
Page 13 
Setup Wizard 
•Describedatabases(ttorcl_srcand ttorcl_trg) 
•Definereplicationpairs (initializationwithimpdpflashback_scn) 
•Definereplicatedtables (all REPOE schema) 
•Configure processes(MINE on source, APPLY on target) 
Initialization 
•Runall.sh (createsdbvrepschema) 
•Copy scripts (seeNextsteps.txt) 
•CreateDBLINK 
•runapply.sh (impdp) 
Start replication 
•Start MINE process 
•Start APPLY process 
•Runstart-console.sh
Dbvisit replicate: logical replication made easy 
1.Why logical replication 
2.Demo (setup) 
3.Configuration alternatives 
4.Demo (run) 
5.Why Dbvisit? 
07.11.2014 
Agenda 
Page 14
Dbvisit replicate: logical replication made easy 
Editions and Features 
07.11.2014 
Configuration alternatives 
Page 15 
LTD 
•Replicatedata for <200 tables 
•For reporting, datawarehouse 
XTD 
•up to 2000 tables. + fetcher, DDL, CLOB,RAC 
•For migration (canberentedby month) 
MAX 
•Unlimitedtables, 2-way 
•Databasedistribution 
CHF 3000 to 7000 
x SOCKET
Dbvisit replicate: logical replication made easy 
MINE + APPLY 
07.11.2014 
Configuration alternatives 
Page 16 
Source server 
Target server 
DB 
DB 
REDO 
SQL 
PLOG 
Dbvisitinternalformat 
PLOG 
APPLY 
MINE
Dbvisit replicate: logical replication made easy 
FETCHER + MINE + APPLY 
07.11.2014 
Configuration alternatives 
Page 17 
Source server 
Target server 
DB 
DB 
PLOG 
REDO 
REDO 
SQL 
APPLY 
FETCHER 
MINE
Dbvisit replicate: logical replication made easy 
FETCHER + MINE + APPLY through SQL*Net 
07.11.2014 
Configuration alternatives 
Page 18 
Source server 
Target server 
Replicationserver 
DB 
DB 
FETCHER 
PLOG 
REDO 
REDO 
MINE 
APPLY 
SQL
Dbvisit replicate: logical replication made easy 
Archivelogonly MINE + APPLY 
07.11.2014 
Configuration alternatives 
Page 19 
Source server 
Target server 
Replicationserver 
DB 
DB 
PLOG 
REDO 
MINE 
APPLY 
SQL 
ARCHIVED 
LOGS 
ARC 
(not real time)
Dbvisit replicate: logical replication made easy 
Target can be outside (no connect to source) 
Apply can be outside (no connect to source) 
TCP/IP Connections 
07.11.2014 
Configuration alternatives 
Page 20 
Source server 
Target server 
FETCHER 
REDO 
MINE 
APPLY 
CONSOLE 
DB 
DB
Dbvisit replicate: logical replication made easy 
dp_networklink 
>The simplest: impdpnetwork_link=from target 
dp_exp 
>Create a dump file with expdpon source 
exp 
>Obsolete exp/imp (old versions) 
ddl_run 
>Get metadata as DDL 
Other alternatives: 
>RMAN duplicate, Storage snapshots, etc. 
Initialization alternatives to import data 
07.11.2014 
Configuration alternatives 
Page 21 
sql
Dbvisit replicate: logical replication made easy 
>Which changes are replicated by import? 
>Which changes are replicated by MINE? 
>We need to MIN complete transactions 
We need to lock in Share mode to stop transactions when getting the SCN 
Initialization alternatives to get SCN 
07.11.2014 
Configuration alternatives 
Page 22 
Transaction 1 
Transaction 3 
Transaction 5 
Transaction 2 
Trans. 4 
Trans. 6 
? 
Transaction 1 
Transaction 3 
Trans. 5 
Transaction 2 
Trans. 4 
Trans. 6 
SCN 
lock 
Data transferredby initialization 
Data transferredby replication 
Data transferredby initialization 
Data transferredby replication
Dbvisit replicate: logical replication made easy 
We must MINE complete transactions: cannot initialize when we have current transaction -> Lock in Share mode. 
one-by-one 
>Locks table one by one and get SCN for each table ->import one by one 
single-scn 
>Locks all tables to get one SCN ->easier import 
ddl-only 
>no lock, no data ->starts with empty tables (for audit) 
resetlogs 
>Using standby or duplicate instead of import 
no-lock (since 2.7) 
>Get SCN for the oldest transaction, no lock 
>When supplemental logging must be already set 
Initialization alternatives to get SCN 
07.11.2014 
Configuration alternatives 
Page 23
Dbvisit replicate: logical replication made easy 
1.Why logical replication 
2.Demo (setup) 
3.Configuration alternatives 
4.Demo (run) 
5.Why Dbvisit? 
07.11.2014 
Agenda 
Page 24
Dbvisit replicate: logical replication made easy 
Setup wizard and initialization 
07.11.2014 
Demo (setup) 
Page 25 
Setup Wizard 
•Describedatabases(ttorcl_srcand ttorcl_trg) 
•Definereplicationpairs (initializationwithimpdpflashback_scn) 
•Definereplicatedtables (all REPOE schema) 
•Configure processes(MINE on source, APPLY on target) 
Initialization 
•Runall.sh (createsdbvrepschema) 
•Copy scripts (seeNextsteps.txt) 
•CreateDBLINK and runapply.sh (impdp) 
Start replication 
•Start MINE process 
•Start APPLY process 
•Runstart-console.sh
Dbvisit replicate: logical replication made easy 
Issue 
>Table has no primary key and has duplicates (all columns have same values) 
>By default, a redo record replication must touch one and only one row 
>When we delete on source, the sqlgenerated affect 2 rows 
Conflict ‘too many rows’ 
>The first redo record received touches 2 rows 
>We force do delete those 2 rows 
>Then the second redo record touches no rows, we ignore it 
Manual conflict resolution 
07.11.2014 
Additional demos 
Page 26 
dbvrep> list conflict 
dbvrep> resolve conflict <id from list conflict> resolve as FORCE 
dbvrep> list conflict 
dbvrep> resolve conflict <id from list conflict> resolve as IGNORE
Dbvisit replicate: logical replication made easy 
Conflict handlers 
>For automatic resolution, we choose to add a ‘where rownum=1’ in the generated sql. 
>Syntax is available from online help 
Conflict happen in logical replication, especially 
>With delete cascade constraints 
>With triggers doing DML 
>With 2-way replication 
Solution: either disable on target, or set conflict handlers 
Automatic conflict resolution 
07.11.2014 
Additional demos 
Page 27 
dbvrep> set_conflict_handlersfor table REPOE.DEMODUP for DELETE on TOO_MANY to sqls/$/ and rownum= 1/ 
dbvrep> help 
dbvrep> help set_conflict_handlers
Dbvisit replicate: logical replication made easy 
Reasons: 
>Reorganization on source 
>Bad conflict resolution, easier to restart then resolve 
1. Stop replication 
>The prepare gives the SCN for the initialization 
2. Initialize the target table 
3. Restart replication 
Resynchronize a table 
07.11.2014 
Additional demos 
Page 28 
dbvrep> unpreparetable REPOE.DEMODUP 
dbvrep> pause apply 
dbvrep> prepare table REPOE.DEMODUP 
SQL> truncate table REPOE.DEMODUP 
SQL> insert /*+ append */ into REPOE.DEMODUP select * from REPOE.DEMODUP@ttorcl_srcas of scn<SCN given by the PREPARE> 
dbvrep> resume
Dbvisit replicate: logical replication made easy 
1.Why logical replication 
2.Demo (setup) 
3.Configuration alternatives 
4.Demo (run) 
5.Why Dbvisit? 
07.11.2014 
Agenda 
Page 29
Dbvisit replicate: logical replication made easy 
DbvisitReplicate vs. GoldenGatevs. Streams 
07.11.2014 
Why Dbvisit? 
Page 30 
What Dbvisitsays 
Main differences we see: 
>GoldenGatecurrently has more features but 
>Dbvisitis per socket (CHF 2500 to 6000) Monthly rental possible 
>Dbvisitoptimistic apply: mine and apply don’t wait for commit 
>Dbvisitis easy to start (setup wizard)
Dbvisit replicate: logical replication made easy 
Know if you need logical replication 
>It’s not the magic solution. It’s a project. 
Testing (POC) is easy 
>Install a Dbvisitreplicate configuration in one hour 
>test it on your data (datatypes, operations,etc.) 
Logical replication is a DevOpsproject 
>Operations is involved 
supplemental logging, redo/archived, filesystemstorage, network 
>Application is involved 
define conflict rules, trigger behavior, supportddatatypes,… 
Core message 
07.11.2014 
Why Dbvisit? 
Page 31
Dbvisit replicate: logical replication made easy 07/11/2014 
Page 32 
Any questions? Please do ask. 
Infrastructure at your Service. 
We look forward to working with you! 
dbiservices is the Dbvisitpartner in Switzerland 
>We offer fixed prices for Dbvisitstandby 
>A POC for Dbvisitreplicate is few days 
>We have direct access to support 
Repattackon 20thNov. in Nuremberg (DOAG) 
>Dbvisitreplicate on your laptop

More Related Content

What's hot

PostgreSQL Write-Ahead Log (Heikki Linnakangas)
PostgreSQL Write-Ahead Log (Heikki Linnakangas) PostgreSQL Write-Ahead Log (Heikki Linnakangas)
PostgreSQL Write-Ahead Log (Heikki Linnakangas) Ontico
 
Oracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New FeaturesOracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New FeaturesDeiby Gómez
 
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...Marco Tusa
 
Oracle: Binding versus caging
Oracle: Binding versus cagingOracle: Binding versus caging
Oracle: Binding versus cagingBertrandDrouvot
 
Oracle Join Methods and 12c Adaptive Plans
Oracle Join Methods and 12c Adaptive PlansOracle Join Methods and 12c Adaptive Plans
Oracle Join Methods and 12c Adaptive PlansFranck Pachot
 
監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜Michitoshi Yoshida
 
An introduction to column store indexes and batch mode
An introduction to column store indexes and batch modeAn introduction to column store indexes and batch mode
An introduction to column store indexes and batch modeChris Adkin
 
Direct SGA access without SQL
Direct SGA access without SQLDirect SGA access without SQL
Direct SGA access without SQLKyle Hailey
 
Database-Migration and -Upgrade with Transportable Tablespaces
Database-Migration and -Upgrade with Transportable TablespacesDatabase-Migration and -Upgrade with Transportable Tablespaces
Database-Migration and -Upgrade with Transportable TablespacesMarkus Flechtner
 
GOTO 2013: Why Zalando trusts in PostgreSQL
GOTO 2013: Why Zalando trusts in PostgreSQLGOTO 2013: Why Zalando trusts in PostgreSQL
GOTO 2013: Why Zalando trusts in PostgreSQLHenning Jacobs
 
Managing terabytes: When PostgreSQL gets big
Managing terabytes: When PostgreSQL gets bigManaging terabytes: When PostgreSQL gets big
Managing terabytes: When PostgreSQL gets bigSelena Deckelmann
 
Building scalable application with sql server
Building scalable application with sql serverBuilding scalable application with sql server
Building scalable application with sql serverChris Adkin
 
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PGConf APAC
 
Column store indexes and batch processing mode (nx power lite)
Column store indexes and batch processing mode (nx power lite)Column store indexes and batch processing mode (nx power lite)
Column store indexes and batch processing mode (nx power lite)Chris Adkin
 
Getting innodb compression_ready_for_facebook_scale
Getting innodb compression_ready_for_facebook_scaleGetting innodb compression_ready_for_facebook_scale
Getting innodb compression_ready_for_facebook_scaleNizameddin Ordulu
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Alex Zaballa
 
Oracle12c Pluggable Database Hands On - TROUG 2014
Oracle12c Pluggable Database Hands On - TROUG 2014Oracle12c Pluggable Database Hands On - TROUG 2014
Oracle12c Pluggable Database Hands On - TROUG 2014Özgür Umut Vurgun
 

What's hot (20)

PostgreSQL Write-Ahead Log (Heikki Linnakangas)
PostgreSQL Write-Ahead Log (Heikki Linnakangas) PostgreSQL Write-Ahead Log (Heikki Linnakangas)
PostgreSQL Write-Ahead Log (Heikki Linnakangas)
 
Oracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New FeaturesOracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New Features
 
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
Percona xtra db cluster(pxc) non blocking operations, what you need to know t...
 
PostgreSQL and RAM usage
PostgreSQL and RAM usagePostgreSQL and RAM usage
PostgreSQL and RAM usage
 
Really Big Elephants: PostgreSQL DW
Really Big Elephants: PostgreSQL DWReally Big Elephants: PostgreSQL DW
Really Big Elephants: PostgreSQL DW
 
Oracle: Binding versus caging
Oracle: Binding versus cagingOracle: Binding versus caging
Oracle: Binding versus caging
 
Oracle Join Methods and 12c Adaptive Plans
Oracle Join Methods and 12c Adaptive PlansOracle Join Methods and 12c Adaptive Plans
Oracle Join Methods and 12c Adaptive Plans
 
監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜監査ログをもっと身近に!〜統合監査のすすめ〜
監査ログをもっと身近に!〜統合監査のすすめ〜
 
An introduction to column store indexes and batch mode
An introduction to column store indexes and batch modeAn introduction to column store indexes and batch mode
An introduction to column store indexes and batch mode
 
Direct SGA access without SQL
Direct SGA access without SQLDirect SGA access without SQL
Direct SGA access without SQL
 
Database-Migration and -Upgrade with Transportable Tablespaces
Database-Migration and -Upgrade with Transportable TablespacesDatabase-Migration and -Upgrade with Transportable Tablespaces
Database-Migration and -Upgrade with Transportable Tablespaces
 
GOTO 2013: Why Zalando trusts in PostgreSQL
GOTO 2013: Why Zalando trusts in PostgreSQLGOTO 2013: Why Zalando trusts in PostgreSQL
GOTO 2013: Why Zalando trusts in PostgreSQL
 
Managing terabytes: When PostgreSQL gets big
Managing terabytes: When PostgreSQL gets bigManaging terabytes: When PostgreSQL gets big
Managing terabytes: When PostgreSQL gets big
 
Building scalable application with sql server
Building scalable application with sql serverBuilding scalable application with sql server
Building scalable application with sql server
 
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata Migrations
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs
 
Column store indexes and batch processing mode (nx power lite)
Column store indexes and batch processing mode (nx power lite)Column store indexes and batch processing mode (nx power lite)
Column store indexes and batch processing mode (nx power lite)
 
Getting innodb compression_ready_for_facebook_scale
Getting innodb compression_ready_for_facebook_scaleGetting innodb compression_ready_for_facebook_scale
Getting innodb compression_ready_for_facebook_scale
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
 
Oracle12c Pluggable Database Hands On - TROUG 2014
Oracle12c Pluggable Database Hands On - TROUG 2014Oracle12c Pluggable Database Hands On - TROUG 2014
Oracle12c Pluggable Database Hands On - TROUG 2014
 

Viewers also liked

[db tech showcase Sapporo 2015] C26:Oracle Standard EditionでPhysical Standby ...
[db tech showcase Sapporo 2015] C26:Oracle Standard EditionでPhysical Standby ...[db tech showcase Sapporo 2015] C26:Oracle Standard EditionでPhysical Standby ...
[db tech showcase Sapporo 2015] C26:Oracle Standard EditionでPhysical Standby ...Insight Technology, Inc.
 
[db tech showcase Sapporo 2015] B15:ビッグデータ/クラウドにデータ連携自由自在 (オンプレミス ↔ クラウド ↔ クラ...
[db tech showcase Sapporo 2015] B15:ビッグデータ/クラウドにデータ連携自由自在 (オンプレミス ↔ クラウド ↔ クラ...[db tech showcase Sapporo 2015] B15:ビッグデータ/クラウドにデータ連携自由自在 (オンプレミス ↔ クラウド ↔ クラ...
[db tech showcase Sapporo 2015] B15:ビッグデータ/クラウドにデータ連携自由自在 (オンプレミス ↔ クラウド ↔ クラ...Insight Technology, Inc.
 
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...Insight Technology, Inc.
 
[db tech showcase Tokyo 2015] C16:Oracle Disaster Recovery at New Zealand sto...
[db tech showcase Tokyo 2015] C16:Oracle Disaster Recovery at New Zealand sto...[db tech showcase Tokyo 2015] C16:Oracle Disaster Recovery at New Zealand sto...
[db tech showcase Tokyo 2015] C16:Oracle Disaster Recovery at New Zealand sto...Insight Technology, Inc.
 
[db tech showcase Tokyo 2015] D25:The difference between logical and physical...
[db tech showcase Tokyo 2015] D25:The difference between logical and physical...[db tech showcase Tokyo 2015] D25:The difference between logical and physical...
[db tech showcase Tokyo 2015] D25:The difference between logical and physical...Insight Technology, Inc.
 
France Alsace Loraine
France   Alsace   LoraineFrance   Alsace   Loraine
France Alsace Loraineguestf69010
 
PERC ReVision 2010 Webinar
PERC ReVision 2010 WebinarPERC ReVision 2010 Webinar
PERC ReVision 2010 WebinarJoshHooper
 
74thオンラインテキストブックマーク
74thオンラインテキストブックマーク74thオンラインテキストブックマーク
74thオンラインテキストブックマーク74th
 
Sarah's Intro Presentation
Sarah's Intro PresentationSarah's Intro Presentation
Sarah's Intro Presentationsarahashleyoso
 
C:\Documents And Settings\Owner\سطح المكتب\Ppt126 A [مسترد]
C:\Documents And Settings\Owner\سطح المكتب\Ppt126 A [مسترد]C:\Documents And Settings\Owner\سطح المكتب\Ppt126 A [مسترد]
C:\Documents And Settings\Owner\سطح المكتب\Ppt126 A [مسترد]guestb616b4
 
Easy way to embed video
Easy way to embed videoEasy way to embed video
Easy way to embed videoguest3b3fc2
 
1อนุชิตเผยแพร่
1อนุชิตเผยแพร่1อนุชิตเผยแพร่
1อนุชิตเผยแพร่somdetpittayakom school
 
《氪周刊:互联网创业必读》(第67期)
《氪周刊:互联网创业必读》(第67期)《氪周刊:互联网创业必读》(第67期)
《氪周刊:互联网创业必读》(第67期)Chada Chiu
 
Power Point Hollywood2
Power Point Hollywood2Power Point Hollywood2
Power Point Hollywood2guestf91eade
 
ประกาศผลการสอบ ม 4 ม3 โรงเรียนเดิม
ประกาศผลการสอบ   ม 4   ม3 โรงเรียนเดิมประกาศผลการสอบ   ม 4   ม3 โรงเรียนเดิม
ประกาศผลการสอบ ม 4 ม3 โรงเรียนเดิมsomdetpittayakom school
 

Viewers also liked (20)

[db tech showcase Sapporo 2015] C26:Oracle Standard EditionでPhysical Standby ...
[db tech showcase Sapporo 2015] C26:Oracle Standard EditionでPhysical Standby ...[db tech showcase Sapporo 2015] C26:Oracle Standard EditionでPhysical Standby ...
[db tech showcase Sapporo 2015] C26:Oracle Standard EditionでPhysical Standby ...
 
[db tech showcase Sapporo 2015] B15:ビッグデータ/クラウドにデータ連携自由自在 (オンプレミス ↔ クラウド ↔ クラ...
[db tech showcase Sapporo 2015] B15:ビッグデータ/クラウドにデータ連携自由自在 (オンプレミス ↔ クラウド ↔ クラ...[db tech showcase Sapporo 2015] B15:ビッグデータ/クラウドにデータ連携自由自在 (オンプレミス ↔ クラウド ↔ クラ...
[db tech showcase Sapporo 2015] B15:ビッグデータ/クラウドにデータ連携自由自在 (オンプレミス ↔ クラウド ↔ クラ...
 
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
 
[db tech showcase Tokyo 2015] C16:Oracle Disaster Recovery at New Zealand sto...
[db tech showcase Tokyo 2015] C16:Oracle Disaster Recovery at New Zealand sto...[db tech showcase Tokyo 2015] C16:Oracle Disaster Recovery at New Zealand sto...
[db tech showcase Tokyo 2015] C16:Oracle Disaster Recovery at New Zealand sto...
 
[db tech showcase Tokyo 2015] D25:The difference between logical and physical...
[db tech showcase Tokyo 2015] D25:The difference between logical and physical...[db tech showcase Tokyo 2015] D25:The difference between logical and physical...
[db tech showcase Tokyo 2015] D25:The difference between logical and physical...
 
Spring isd
Spring isdSpring isd
Spring isd
 
France Alsace Loraine
France   Alsace   LoraineFrance   Alsace   Loraine
France Alsace Loraine
 
PERC ReVision 2010 Webinar
PERC ReVision 2010 WebinarPERC ReVision 2010 Webinar
PERC ReVision 2010 Webinar
 
74thオンラインテキストブックマーク
74thオンラインテキストブックマーク74thオンラインテキストブックマーク
74thオンラインテキストブックマーク
 
Sarah's Intro Presentation
Sarah's Intro PresentationSarah's Intro Presentation
Sarah's Intro Presentation
 
EZinsurance
EZinsuranceEZinsurance
EZinsurance
 
Presenta
PresentaPresenta
Presenta
 
C:\Documents And Settings\Owner\سطح المكتب\Ppt126 A [مسترد]
C:\Documents And Settings\Owner\سطح المكتب\Ppt126 A [مسترد]C:\Documents And Settings\Owner\سطح المكتب\Ppt126 A [مسترد]
C:\Documents And Settings\Owner\سطح المكتب\Ppt126 A [مسترد]
 
Easy way to embed video
Easy way to embed videoEasy way to embed video
Easy way to embed video
 
1อนุชิตเผยแพร่
1อนุชิตเผยแพร่1อนุชิตเผยแพร่
1อนุชิตเผยแพร่
 
《氪周刊:互联网创业必读》(第67期)
《氪周刊:互联网创业必读》(第67期)《氪周刊:互联网创业必读》(第67期)
《氪周刊:互联网创业必读》(第67期)
 
Ca
CaCa
Ca
 
Power Point Hollywood2
Power Point Hollywood2Power Point Hollywood2
Power Point Hollywood2
 
Time Stress
Time StressTime Stress
Time Stress
 
ประกาศผลการสอบ ม 4 ม3 โรงเรียนเดิม
ประกาศผลการสอบ   ม 4   ม3 โรงเรียนเดิมประกาศผลการสอบ   ม 4   ม3 โรงเรียนเดิม
ประกาศผลการสอบ ม 4 ม3 โรงเรียนเดิม
 

Similar to Dbvisit replicate: logical replication made easy

Designing For Occasionally Connected Apps Slideshare
Designing For Occasionally Connected Apps SlideshareDesigning For Occasionally Connected Apps Slideshare
Designing For Occasionally Connected Apps SlideshareDean Willson
 
Evolutionary Database Design
Evolutionary Database DesignEvolutionary Database Design
Evolutionary Database DesignAndrei Solntsev
 
Replication features, technologies and 3rd party Extinction
Replication features, technologies and 3rd party ExtinctionReplication features, technologies and 3rd party Extinction
Replication features, technologies and 3rd party ExtinctionBen Mildren
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalabilityWim Godden
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database DeploymentsMike Willbanks
 
Doag data replication with oracle golden gate: Looking behind the scenes
Doag data replication with oracle golden gate: Looking behind the scenesDoag data replication with oracle golden gate: Looking behind the scenes
Doag data replication with oracle golden gate: Looking behind the scenesTrivadis
 
MySQL Binary Log API Presentation - OSCON 2011
MySQL Binary Log API Presentation - OSCON 2011MySQL Binary Log API Presentation - OSCON 2011
MySQL Binary Log API Presentation - OSCON 2011Mats Kindahl
 
Replicate from Oracle to data warehouses and analytics
Replicate from Oracle to data warehouses and analyticsReplicate from Oracle to data warehouses and analytics
Replicate from Oracle to data warehouses and analyticsContinuent
 
Data Grids with Oracle Coherence
Data Grids with Oracle CoherenceData Grids with Oracle Coherence
Data Grids with Oracle CoherenceBen Stopford
 
What is new in MariaDB 10.6?
What is new in MariaDB 10.6?What is new in MariaDB 10.6?
What is new in MariaDB 10.6?Mydbops
 
MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014) MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014) Frazer Clement
 
Pres Db2 native rest json and z/OS connect
Pres Db2 native rest json and z/OS connect Pres Db2 native rest json and z/OS connect
Pres Db2 native rest json and z/OS connect Cécile Benhamou
 
(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systemssosorry
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Bastian Feder
 
How To Start Up With PHP In IBM i
How To Start Up With PHP In IBM iHow To Start Up With PHP In IBM i
How To Start Up With PHP In IBM iSam Pinkhasov
 
How To Start Up With Php In Ibm I
How To Start Up With Php In Ibm IHow To Start Up With Php In Ibm I
How To Start Up With Php In Ibm IAlex Frenkel
 
Opendj - A LDAP Server for dummies
Opendj - A LDAP Server for dummiesOpendj - A LDAP Server for dummies
Opendj - A LDAP Server for dummiesClaudio Borges
 
Intro to Azure SQL database
Intro to Azure SQL databaseIntro to Azure SQL database
Intro to Azure SQL databaseSteve Knutson
 
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...InfluxData
 

Similar to Dbvisit replicate: logical replication made easy (20)

Designing For Occasionally Connected Apps Slideshare
Designing For Occasionally Connected Apps SlideshareDesigning For Occasionally Connected Apps Slideshare
Designing For Occasionally Connected Apps Slideshare
 
Evolutionary Database Design
Evolutionary Database DesignEvolutionary Database Design
Evolutionary Database Design
 
Replication features, technologies and 3rd party Extinction
Replication features, technologies and 3rd party ExtinctionReplication features, technologies and 3rd party Extinction
Replication features, technologies and 3rd party Extinction
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database Deployments
 
Doag data replication with oracle golden gate: Looking behind the scenes
Doag data replication with oracle golden gate: Looking behind the scenesDoag data replication with oracle golden gate: Looking behind the scenes
Doag data replication with oracle golden gate: Looking behind the scenes
 
MySQL Binary Log API Presentation - OSCON 2011
MySQL Binary Log API Presentation - OSCON 2011MySQL Binary Log API Presentation - OSCON 2011
MySQL Binary Log API Presentation - OSCON 2011
 
Replicate from Oracle to data warehouses and analytics
Replicate from Oracle to data warehouses and analyticsReplicate from Oracle to data warehouses and analytics
Replicate from Oracle to data warehouses and analytics
 
Data Grids with Oracle Coherence
Data Grids with Oracle CoherenceData Grids with Oracle Coherence
Data Grids with Oracle Coherence
 
What is new in MariaDB 10.6?
What is new in MariaDB 10.6?What is new in MariaDB 10.6?
What is new in MariaDB 10.6?
 
MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014) MySQL Cluster Asynchronous replication (2014)
MySQL Cluster Asynchronous replication (2014)
 
Ipc mysql php
Ipc mysql php Ipc mysql php
Ipc mysql php
 
Pres Db2 native rest json and z/OS connect
Pres Db2 native rest json and z/OS connect Pres Db2 native rest json and z/OS connect
Pres Db2 native rest json and z/OS connect
 
(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
 
How To Start Up With PHP In IBM i
How To Start Up With PHP In IBM iHow To Start Up With PHP In IBM i
How To Start Up With PHP In IBM i
 
How To Start Up With Php In Ibm I
How To Start Up With Php In Ibm IHow To Start Up With Php In Ibm I
How To Start Up With Php In Ibm I
 
Opendj - A LDAP Server for dummies
Opendj - A LDAP Server for dummiesOpendj - A LDAP Server for dummies
Opendj - A LDAP Server for dummies
 
Intro to Azure SQL database
Intro to Azure SQL databaseIntro to Azure SQL database
Intro to Azure SQL database
 
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
 

More from Franck Pachot

Meetup - YugabyteDB - Introduction and key features
Meetup - YugabyteDB - Introduction and key featuresMeetup - YugabyteDB - Introduction and key features
Meetup - YugabyteDB - Introduction and key featuresFranck Pachot
 
Oracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor formatOracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor formatFranck Pachot
 
19 features you will miss if you leave Oracle Database
19 features you will miss if you leave Oracle Database19 features you will miss if you leave Oracle Database
19 features you will miss if you leave Oracle DatabaseFranck Pachot
 
Oracle Database on Docker
Oracle Database on DockerOracle Database on Docker
Oracle Database on DockerFranck Pachot
 
Les bases BI sont-elles différentes?
Les bases BI sont-elles différentes?Les bases BI sont-elles différentes?
Les bases BI sont-elles différentes?Franck Pachot
 
Star Transformation, 12c Adaptive Bitmap Pruning and In-Memory option
Star Transformation, 12c Adaptive Bitmap Pruning and In-Memory optionStar Transformation, 12c Adaptive Bitmap Pruning and In-Memory option
Star Transformation, 12c Adaptive Bitmap Pruning and In-Memory optionFranck Pachot
 
CBO choice between Index and Full Scan: the good, the bad and the ugly param...
CBO choice between Index and Full Scan:  the good, the bad and the ugly param...CBO choice between Index and Full Scan:  the good, the bad and the ugly param...
CBO choice between Index and Full Scan: the good, the bad and the ugly param...Franck Pachot
 
Oracle Parallel Distribution and 12c Adaptive Plans
Oracle Parallel Distribution and 12c Adaptive PlansOracle Parallel Distribution and 12c Adaptive Plans
Oracle Parallel Distribution and 12c Adaptive PlansFranck Pachot
 
Oracle table lock modes
Oracle table lock modesOracle table lock modes
Oracle table lock modesFranck Pachot
 
Reading AWR or Statspack Report - Straight to the Goal
Reading AWR or Statspack Report - Straight to the GoalReading AWR or Statspack Report - Straight to the Goal
Reading AWR or Statspack Report - Straight to the GoalFranck Pachot
 

More from Franck Pachot (10)

Meetup - YugabyteDB - Introduction and key features
Meetup - YugabyteDB - Introduction and key featuresMeetup - YugabyteDB - Introduction and key features
Meetup - YugabyteDB - Introduction and key features
 
Oracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor formatOracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor format
 
19 features you will miss if you leave Oracle Database
19 features you will miss if you leave Oracle Database19 features you will miss if you leave Oracle Database
19 features you will miss if you leave Oracle Database
 
Oracle Database on Docker
Oracle Database on DockerOracle Database on Docker
Oracle Database on Docker
 
Les bases BI sont-elles différentes?
Les bases BI sont-elles différentes?Les bases BI sont-elles différentes?
Les bases BI sont-elles différentes?
 
Star Transformation, 12c Adaptive Bitmap Pruning and In-Memory option
Star Transformation, 12c Adaptive Bitmap Pruning and In-Memory optionStar Transformation, 12c Adaptive Bitmap Pruning and In-Memory option
Star Transformation, 12c Adaptive Bitmap Pruning and In-Memory option
 
CBO choice between Index and Full Scan: the good, the bad and the ugly param...
CBO choice between Index and Full Scan:  the good, the bad and the ugly param...CBO choice between Index and Full Scan:  the good, the bad and the ugly param...
CBO choice between Index and Full Scan: the good, the bad and the ugly param...
 
Oracle Parallel Distribution and 12c Adaptive Plans
Oracle Parallel Distribution and 12c Adaptive PlansOracle Parallel Distribution and 12c Adaptive Plans
Oracle Parallel Distribution and 12c Adaptive Plans
 
Oracle table lock modes
Oracle table lock modesOracle table lock modes
Oracle table lock modes
 
Reading AWR or Statspack Report - Straight to the Goal
Reading AWR or Statspack Report - Straight to the GoalReading AWR or Statspack Report - Straight to the Goal
Reading AWR or Statspack Report - Straight to the Goal
 

Dbvisit replicate: logical replication made easy

  • 1. Dbvisit replicate: logical replication made easy Infrastructure at your Service. Dbvisit replicate: logical replication made easy
  • 2. Dbvisit replicate: logical replication made easy 07.11.2014 Infrastructure at your Service. About me Page 2 Franck Pachot Senior consultant Oracle Technology Leader Mobile +41 79 963 27 22franck.pachot@dbi-services.comwww.dbi-services.com Presentations, Articles, blogs, forums
  • 3. Dbvisit replicate: logical replication made easy Experts At Your Service >35 specialists in IT infrastructure >Certified, experienced, passionate Based In Switzerland >100% self-financed Swiss company >Over CHF 4 mio. turnover Leading In Infrastructure Services >More than 100 customers in CH, D, & F >Over 30 SLAs dbi FlexServicecontracted 07.11.2014 dbiservices Who we are Page 3
  • 4. Dbvisit replicate: logical replication made easy 1.Why logical replication? 2.Demo (setup) 3.Configuration alternatives 4.Demo (run) 5.Why Dbvisit? 07.11.2014 Agenda Page 4
  • 5. Dbvisit replicate: logical replication made easy Logical vs. Physical 07.11.2014 Why Logical replication Page 5 REDO DB SQL statements REDO LOG records REDO LOG records Applied on tables Applied on files Applied on files APPLY Physical replication >Redo based >Oracle EE or Dbvisitstandby redo redo
  • 6. Dbvisit replicate: logical replication made easy Logical vs. Physical 07.11.2014 Why Logical replication Page 6 REDO DB SQL statements REDO LOG records REDO LOG records Applied on tables Applied on files Applied on files SQL statements Applied on tables APPLY trigger mviewlog sql Logical replication >Application based >Oracle Streams
  • 7. Dbvisit replicate: logical replication made easy Logical vs. Physical 07.11.2014 Why Logical replication Page 7 REDO DB REDO LOG records Applied on tables Applied on files Applied on files SQL statements Applied on tables sql Logical replication >Redo based >Golden Gate or Dbvisitreplicate SQL statements MINE redo REDO LOG records APPLY
  • 8. Dbvisit replicate: logical replication made easy Physical replication >High performance, exact copy (HA) >Same version (platform, database, application) >No filter or transformation (same tables, columns, indexes, partitions) >Oracle Data Guard (EE), Dbvisitstandby, Manual standby and scripts Logical replication based on redo >More complex (supported datatypes, conflict resolution) >Destination can differ (version, data model, data) >We choose what we replicate (filter, change deletes to inserts) >Destination is Read-Write, can be 2-ways >Oracle Golden Gate, Dbvisitreplicate, Streams Logical vs. Physical 07.11.2014 Why Logical replication Page 8
  • 9. Dbvisit replicate: logical replication made easy Offloaded query environments >Reporting, Data Quality Distributed databases >local proxies replicated to master Data warehousing and Audit >Extract data for ETL, can be real time Audit >Stores all modifications (old an new values) Migration projects >Oracle Edition downgrade (go to Standard Edition) >Oracle upgrades, OS platform, to the Cloud, etc. >11g to PDB (without non_cdb_to_pdb.sql) What are the use cases? 07.11.2014 Why logical replication Page 9
  • 10. Dbvisit replicate: logical replication made easy 1.Why logical replication 2.Demo (setup) 3.Configuration alternatives 4.Demo (run) 5.Why Dbvisit? 07.11.2014 Agenda Page 10
  • 11. Dbvisit replicate: logical replication made easy http://www.dbvisit.com/repattack/ 07.11.2014 Demo (setup) Page 11
  • 12. Dbvisit replicate: logical replication made easy Two VirtualBoxVM: >source >Linux Centos 6.5, Oracle XE 11g with XE database >Swingbenchschema, data and application >target >Linux Centos 6.5, Oracle XE 11g with XE database (empty) Downloaded and installed dbvrepon both machines >As root, on source and target: >Run wizard: http://screencast-o-matic.com/u/nTb6/dbvisit-repattack-setup Demo environment 07.11.2014 Demo (setup) Page 12 root@source# rpm -ivhdbvisit_replicate-2.7.06-1.x86_64.rpm oracle@source# dbvrep Dbvrep> setup wizard
  • 13. Dbvisit replicate: logical replication made easy Setup wizard and initialization 07.11.2014 Demo (setup) Page 13 Setup Wizard •Describedatabases(ttorcl_srcand ttorcl_trg) •Definereplicationpairs (initializationwithimpdpflashback_scn) •Definereplicatedtables (all REPOE schema) •Configure processes(MINE on source, APPLY on target) Initialization •Runall.sh (createsdbvrepschema) •Copy scripts (seeNextsteps.txt) •CreateDBLINK •runapply.sh (impdp) Start replication •Start MINE process •Start APPLY process •Runstart-console.sh
  • 14. Dbvisit replicate: logical replication made easy 1.Why logical replication 2.Demo (setup) 3.Configuration alternatives 4.Demo (run) 5.Why Dbvisit? 07.11.2014 Agenda Page 14
  • 15. Dbvisit replicate: logical replication made easy Editions and Features 07.11.2014 Configuration alternatives Page 15 LTD •Replicatedata for <200 tables •For reporting, datawarehouse XTD •up to 2000 tables. + fetcher, DDL, CLOB,RAC •For migration (canberentedby month) MAX •Unlimitedtables, 2-way •Databasedistribution CHF 3000 to 7000 x SOCKET
  • 16. Dbvisit replicate: logical replication made easy MINE + APPLY 07.11.2014 Configuration alternatives Page 16 Source server Target server DB DB REDO SQL PLOG Dbvisitinternalformat PLOG APPLY MINE
  • 17. Dbvisit replicate: logical replication made easy FETCHER + MINE + APPLY 07.11.2014 Configuration alternatives Page 17 Source server Target server DB DB PLOG REDO REDO SQL APPLY FETCHER MINE
  • 18. Dbvisit replicate: logical replication made easy FETCHER + MINE + APPLY through SQL*Net 07.11.2014 Configuration alternatives Page 18 Source server Target server Replicationserver DB DB FETCHER PLOG REDO REDO MINE APPLY SQL
  • 19. Dbvisit replicate: logical replication made easy Archivelogonly MINE + APPLY 07.11.2014 Configuration alternatives Page 19 Source server Target server Replicationserver DB DB PLOG REDO MINE APPLY SQL ARCHIVED LOGS ARC (not real time)
  • 20. Dbvisit replicate: logical replication made easy Target can be outside (no connect to source) Apply can be outside (no connect to source) TCP/IP Connections 07.11.2014 Configuration alternatives Page 20 Source server Target server FETCHER REDO MINE APPLY CONSOLE DB DB
  • 21. Dbvisit replicate: logical replication made easy dp_networklink >The simplest: impdpnetwork_link=from target dp_exp >Create a dump file with expdpon source exp >Obsolete exp/imp (old versions) ddl_run >Get metadata as DDL Other alternatives: >RMAN duplicate, Storage snapshots, etc. Initialization alternatives to import data 07.11.2014 Configuration alternatives Page 21 sql
  • 22. Dbvisit replicate: logical replication made easy >Which changes are replicated by import? >Which changes are replicated by MINE? >We need to MIN complete transactions We need to lock in Share mode to stop transactions when getting the SCN Initialization alternatives to get SCN 07.11.2014 Configuration alternatives Page 22 Transaction 1 Transaction 3 Transaction 5 Transaction 2 Trans. 4 Trans. 6 ? Transaction 1 Transaction 3 Trans. 5 Transaction 2 Trans. 4 Trans. 6 SCN lock Data transferredby initialization Data transferredby replication Data transferredby initialization Data transferredby replication
  • 23. Dbvisit replicate: logical replication made easy We must MINE complete transactions: cannot initialize when we have current transaction -> Lock in Share mode. one-by-one >Locks table one by one and get SCN for each table ->import one by one single-scn >Locks all tables to get one SCN ->easier import ddl-only >no lock, no data ->starts with empty tables (for audit) resetlogs >Using standby or duplicate instead of import no-lock (since 2.7) >Get SCN for the oldest transaction, no lock >When supplemental logging must be already set Initialization alternatives to get SCN 07.11.2014 Configuration alternatives Page 23
  • 24. Dbvisit replicate: logical replication made easy 1.Why logical replication 2.Demo (setup) 3.Configuration alternatives 4.Demo (run) 5.Why Dbvisit? 07.11.2014 Agenda Page 24
  • 25. Dbvisit replicate: logical replication made easy Setup wizard and initialization 07.11.2014 Demo (setup) Page 25 Setup Wizard •Describedatabases(ttorcl_srcand ttorcl_trg) •Definereplicationpairs (initializationwithimpdpflashback_scn) •Definereplicatedtables (all REPOE schema) •Configure processes(MINE on source, APPLY on target) Initialization •Runall.sh (createsdbvrepschema) •Copy scripts (seeNextsteps.txt) •CreateDBLINK and runapply.sh (impdp) Start replication •Start MINE process •Start APPLY process •Runstart-console.sh
  • 26. Dbvisit replicate: logical replication made easy Issue >Table has no primary key and has duplicates (all columns have same values) >By default, a redo record replication must touch one and only one row >When we delete on source, the sqlgenerated affect 2 rows Conflict ‘too many rows’ >The first redo record received touches 2 rows >We force do delete those 2 rows >Then the second redo record touches no rows, we ignore it Manual conflict resolution 07.11.2014 Additional demos Page 26 dbvrep> list conflict dbvrep> resolve conflict <id from list conflict> resolve as FORCE dbvrep> list conflict dbvrep> resolve conflict <id from list conflict> resolve as IGNORE
  • 27. Dbvisit replicate: logical replication made easy Conflict handlers >For automatic resolution, we choose to add a ‘where rownum=1’ in the generated sql. >Syntax is available from online help Conflict happen in logical replication, especially >With delete cascade constraints >With triggers doing DML >With 2-way replication Solution: either disable on target, or set conflict handlers Automatic conflict resolution 07.11.2014 Additional demos Page 27 dbvrep> set_conflict_handlersfor table REPOE.DEMODUP for DELETE on TOO_MANY to sqls/$/ and rownum= 1/ dbvrep> help dbvrep> help set_conflict_handlers
  • 28. Dbvisit replicate: logical replication made easy Reasons: >Reorganization on source >Bad conflict resolution, easier to restart then resolve 1. Stop replication >The prepare gives the SCN for the initialization 2. Initialize the target table 3. Restart replication Resynchronize a table 07.11.2014 Additional demos Page 28 dbvrep> unpreparetable REPOE.DEMODUP dbvrep> pause apply dbvrep> prepare table REPOE.DEMODUP SQL> truncate table REPOE.DEMODUP SQL> insert /*+ append */ into REPOE.DEMODUP select * from REPOE.DEMODUP@ttorcl_srcas of scn<SCN given by the PREPARE> dbvrep> resume
  • 29. Dbvisit replicate: logical replication made easy 1.Why logical replication 2.Demo (setup) 3.Configuration alternatives 4.Demo (run) 5.Why Dbvisit? 07.11.2014 Agenda Page 29
  • 30. Dbvisit replicate: logical replication made easy DbvisitReplicate vs. GoldenGatevs. Streams 07.11.2014 Why Dbvisit? Page 30 What Dbvisitsays Main differences we see: >GoldenGatecurrently has more features but >Dbvisitis per socket (CHF 2500 to 6000) Monthly rental possible >Dbvisitoptimistic apply: mine and apply don’t wait for commit >Dbvisitis easy to start (setup wizard)
  • 31. Dbvisit replicate: logical replication made easy Know if you need logical replication >It’s not the magic solution. It’s a project. Testing (POC) is easy >Install a Dbvisitreplicate configuration in one hour >test it on your data (datatypes, operations,etc.) Logical replication is a DevOpsproject >Operations is involved supplemental logging, redo/archived, filesystemstorage, network >Application is involved define conflict rules, trigger behavior, supportddatatypes,… Core message 07.11.2014 Why Dbvisit? Page 31
  • 32. Dbvisit replicate: logical replication made easy 07/11/2014 Page 32 Any questions? Please do ask. Infrastructure at your Service. We look forward to working with you! dbiservices is the Dbvisitpartner in Switzerland >We offer fixed prices for Dbvisitstandby >A POC for Dbvisitreplicate is few days >We have direct access to support Repattackon 20thNov. in Nuremberg (DOAG) >Dbvisitreplicate on your laptop