oracle goldengate on disaster recovery - doag.org · > configure oracle goldengate on the dr...

29
Infrastructure at your Service. Oracle GoldenGate on Disaster Recovery

Upload: others

Post on 02-Sep-2019

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Infrastructure at your Service.

Oracle GoldenGate on Disaster Recovery

Page 2: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Hervé Schweitzer Chief Technology Officer Principal Consultant Mobile +41 79 963 43 67 [email protected] www.dbi-services.com

11/18/15

Infrastructure at your Service.

About Me

Page 2

Page 3: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Experts At Your Service >  40 specialists in IT infrastructure >  Certified, experienced, passionate

Based In Switzerland >  100% self-financed Swiss company >  Over CHF 6 mio. turnover

Leading In Infrastructure Services >  More than 100 customers in CH, D, & F >  Over 40 SLAs dbi FlexService contracted

11/18/15

dbi services Who we are

Page 3

dbi services is hiring in Basel & Zürich ([email protected])

Page 4: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

1.  Oracle GoldenGate usual implementation

2.  Disaster Recovery

3.  Oracle GoldenGate on Disaster Recovery

4.  Technical Solution

5.  Conclusion

11/18/15 Page 4

Agenda

Page 5: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

11/18/15

Oracle GoldenGate usual implementation

Page 5

Page 6: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Usually Oracle GoldenGate is used to replicate OLTP data to: >  ODS (Operational Data Store)

>  Often used as an interim logical area for a Datawarehouse >  Database designed to integrate data from multiple sources for additional

operations on the data >  Data can be scrubbed, resolved for redundancy and checked for

compliance according to the business rules

>  Datawarehouse/BI (Business Intelligence) >  Long term reporting or archiving >  Analytical reports on current or historical data

>  Active/Active Replication

>  Long distance between different office >  Data available on each system locally (High Availability)

11/18/15 Page 6

Oracle GoldenGate usual implementation

Page 7: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Why Oracle GoldenGate 12c? >  Can replicate data from any database rdbms (heterogeneous) >  Low impact on production database

>  Read transaction directly from memory (Oracle 12c Integrated Capture) >  Otherwise the reads are done from the redo or archive files only

>  Real-Time replication solution >  Allows reporting with live data

>  Supported with other Oracle products >  Oracle Active DataGuard >  Oracle Grid Infrastructure resource management >  Oracle ODA/Exadata

>  Fast recovery with low performance impact >  Most of the object types are supported >  Allow transformation and filtering

11/18/15 Page 7

Oracle GoldenGate usual implementation

Page 8: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

11/18/15 Page 8

Oracle GoldenGate usual implementation

Primary Data Center

Server 1

ARGUSDB

GoldenGate EXTRACT

Server 2

ODSDB

GoldenGate REPLICAT

GoldenGate Trail files

Local/Remote

Page 9: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Extract

11/18/15 Page 9

Oracle GoldenGate usual implementation

EXTRACT SCOTT USERIDALIAS gg12 DBOPTIONS ALLOWUNUSEDCOLUMN EXTTRAIL /u01/ggtrail/DB1/dirdat/sa TABLE scott.*, TOKENS ( TRANSACTION_DATE = @GETENV ('GGHEADER', 'COMMITTIMESTAMP'));

EXTRACT example with one additional columns

Page 10: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Replicat

11/18/15 Page 10

Oracle GoldenGate usual implementation

REPLICAT example with keeping the deleted rows

REPLICAT SCOTT ASSUMETARGETDEFS USERIDALIAS gg12 DISCARDFILE /u01/app/goldengate/product/12.1.2/discard/SCOTT1_discard.txt, append, megabytes 10 ALLOWDUPTARGETMAP GETINSERTS GETUPDATES IGNOREDELETES MAP SCOTT.*, TARGET SCOTT1.* , COLMAP (USEDEFAULTS, transaction_date= @token ('TRANSACTION_DATE')); IGNOREINSERTS IGNOREUPDATES GETDELETES UPDATEDELETES MAP SCOTT.*, TARGET SCOTT1.* , COLMAP (USEDEFAULTS, transaction_date= @token ('TRANSACTION_DATE'), is_deleted = 'Y');

Page 11: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

11/18/15

Disaster Recovery

Page 11

Page 12: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Companies protect their most important applications on a Disaster Recovery site

To be protected from major issues such as a earthquake or flood

Disaster Recovery should be activated with only few manual interventions (even better: automatically)

11/18/15 Page 12

Disaster Recovery

Page 13: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

11/18/15

Disaster Recovery

Primary Data Center

Server 1

ARGUSDB

Disaster Recovery Data Center

Server 1

ARGUSDB Standby

Oracle Data Guard 12c

Server 2

ODSDB

Server 2

ODSDB Standby

Oracle Data Guard 12c

Observer

Observer

Page 13

Page 14: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

11/18/15

Oracle GoldenGate on Disaster Recovery

Page 14

Page 15: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Because of "globalization" and 7*24 business requirements, both OLTP and Datawarehouse databases become more and more important

Beside the database, integration solutions like Oracle GoldenGate also need to be considered in the Disaster Recovery concept

Is it possible to keep Oracle GoldenGate in sync between two databases on the Disaster Recovery site?

11/18/15 Page 15

Oracle GoldenGate on Disaster Recovery

Page 16: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

11/18/15 Page 16

Oracle GoldenGate on Disaster Recovery

Primary Data Center

Server 1

ARGUSDB

GoldenGate Extract

DisasterRecovery Data Center 2

Server 1

ARGUSDB Standby

GoldenGate Extract

Oracle Data Guard 12c

?

Server 2

ODSDB

Server 2

ODSDB Standby

Oracle Data Guard 12c

GoldenGate Replicat

GoldenGate Replicat

?

?

Page 17: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

GoldenGate configuration available on Disaster Recovery site >  Configure GoldenGate on a shared file system

>  Very rare to have a clustered FS between the primary and DR sites available

>  Move the configuration to Oracle DBFS >  GoldenGate configuration and trail files will be written to a LOB file in the

database >  GoldenGate itself will generate redo activity >  One customer had a database crash with this solution

>  Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard >  This solution has been selected and will be presented in the next slides

11/18/15 Page 17

Oracle GoldenGate on Disaster Recovery

Page 18: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

11/18/15

Technical Solution

Page 18

Page 19: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Overview

11/18/15 Page 19

Technical Solution

ARGUSDB

GoldenGate Extract

Server 1

ARGUSDB Standby

GoldenGate Extract

Oracle Data Guard 12c

Server 2

ODSDB

Server 2

ODSDB

GoldenGate Replicat

GoldenGate Replicat

With Active Data Guard

Primary DB with another dbid or sid

Primary Data Center

DisasterRecovery Data Center 2

Server 1

Page 20: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Setup on standby

11/18/15 Page 20

Technical Solution

EXTRACT running with Active Data Guard on Standby Database

GGSCI 1> view extract SCOTT EXTRACT SCOTT … TRANLOGOPTIONS MINEFROMACTIVEDG …

GGSCI 2> info extract SCOTT, detail … Target Extract Trails:

Trail Name Seqno RBA Max MB Trail Type /u01/ggtrail/DB1/dirdat/sa 143 224110 100 EXTTRAIL Extract Source /u02/oradata/DB1/sredog101m1DB1.dbf <- Standby redolog file /u02/oradata/DB1/sredog102m1DB1.dbf <- Standby redolog file

Page 21: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Switchover

11/18/15 Page 21

Technical Solution

Primary Data Center

Server 1

ARGUSDB

GoldenGate Extract

DisasterRecovery Data Center 2

Server 1

ARGUSDB Standby

GoldenGate Extract

Oracle Data Guard 12c

Server 2

ODSDB

Server 2

ODSDB

GoldenGate Replicat

GoldenGate Replicat

With Active Data Guard

Primary DB with another dbid or sid

ARGUSDB ARGUSDB Standby

With Active Data Guard

Page 22: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Action needed after a switchover

11/18/15 Page 22

Technical Solution

On new Primary modify the EXTRACT

On new Standby modify the EXTRACT

GGSCI 1> edit extract SCOTT “Only remove the MINEFROMACTIVEDG parameter” GGSCI 2> start extract SCOTT “extract from ggserr.log logfile the SCN# value from role switch message” GGSCI 3> alter extract SCOTT SCN# GGSCI 4> start extract SCOTT

GGSCI 1> edit extract SCOTT “add the below parameter” … TRANLOGOPTIONS MINEFROMACTIVEDG … GGSCI 2> start extract SCOTT “extract from ggserr.log logfile the SCN# value from role switch message” GGSCI 3> alter extract SCOTT SCN# GGSCI 4> start extract SCOTT

# grep “Data Guard” ggserr.log 2015-11-09 18:02:42 ERROR OGG-02803 Oracle GoldenGate Capture for Oracle, scott.prm: Encountered a Data Guard role transition. Alter Extract to SCN 11775790 and restart Extract, or recreate Extract with the correct number of threads at SCN 11775790.

Page 23: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Failover

11/18/15 Page 23

Technical Solution

Primary Data Center

Server 1

ARGUSDB

GoldenGate Extract

Server 1

ARGUSDB Standby

GoldenGate Extract

Oracle Data Guard 12c

Server 2

ODSDB

Server 2

ODSDB

GoldenGate Replicat

GoldenGate Replicat

With Active Data Guard

Primary DB with another dbid or sid

ARGUSDB

DisasterRecovery Data Center 2

Page 24: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Action needed after a Failover

11/18/15 Page 24

Technical Solution

On new Primary modify the EXTRACT

GGSCI 1> edit extract SCOTT “remove the TRANLOGOPTIONS MINEFROMACTIVEDG parameter” “add the below parameter” … TRANLOGOPTIONS USEPREVRESETLOGSID … GGSCI 2> start extract SCOTT “extract from ggserr.log logfile the SCN# value from role switch message” GGSCI 3> edit extract SCOTT “remove the TRANLOGOPTIONS USEPREVRESETLOGSID parameter” GGSCI 4> alter extract SCOTT SCN# GGSCI 5> start extract SCOTT

Page 25: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

11/18/15

Demo

Page 25

Page 26: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

presentation

11/18/15 Page 26

Demo environment

vmreforatun

DB1

GoldenGate Extract

SCOTT.EMP

vmora12c

ARGUSDB Standby

GoldenGate Extract

SCOTT.EMP

Oracle Data Guard 12c

DB2

GoldenGate Replicat

SCOTT1.EMP

GoldenGate Replicat

SCOTT2.EMP

With Active Data Guard DB1

vmrep12c

Page 27: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

11/18/15

Conclusion

Page 27

Page 28: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Oracle GoldenGate will always run on both sides; no surprise after a switchover or failover

On the disaster site the replicated environment is also available for reporting

No additional license costs because Active Data Guard is part of Oracle GoldenGate

Both sides must be installed and configured for Oracle GoldenGate

Only usable with Classical Extract

11/18/15 Page 28

Conclusion

Page 29: Oracle GoldenGate on Disaster Recovery - doag.org · > Configure Oracle GoldenGate on the DR site with Oracle Active DataGuard > This solution has been selected and will be presented

Oracle GoldenGate on Disaster Recovery

Hervé Schweitzer Chief Technology Officer Principal Consultant Mobile +41 79 963 43 67 [email protected] www.dbi-services.com

11/18/15

Infrastructure at your Service.

Any questions? Please do ask

Page 29

… und viele Live Demos

am Stand 242

Looking forward to seeing you at booth 242!