Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
oracle_goldengate_apache_kafka [2020/11/12 12:44] – andonovj | oracle_goldengate_apache_kafka [2020/11/12 12:51] (current) – andonovj | ||
---|---|---|---|
Line 140: | Line 140: | ||
</ | </ | ||
+ | |||
+ | =====Test===== | ||
+ | To test the replication, | ||
+ | |||
+ | < | ||
+ | [oracle@edvmr1p0 oggsrc]$ sqlplus oggsrc/ | ||
+ | |||
+ | SQL*Plus: Release 12.1.0.2.0 Production on Thu Nov 12 12:46:13 2020 | ||
+ | |||
+ | Copyright (c) 1982, 2014, Oracle. | ||
+ | |||
+ | Last Successful login time: Thu Nov 12 2020 12:26:00 +00:00 | ||
+ | |||
+ | Connected to: | ||
+ | Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production | ||
+ | With the Partitioning, | ||
+ | |||
+ | SQL> insert into customer_prod select * from customer where customer_id < 101; | ||
+ | |||
+ | 100 rows created. | ||
+ | |||
+ | SQL> commit; | ||
+ | |||
+ | Commit complete. | ||
+ | |||
+ | SQL> | ||
+ | </ | ||
+ | |||
+ | Check if the data is replicated between: GG Extract -> GG Replicat | ||
+ | |||
+ | < | ||
+ | --Source: | ||
+ | GGSCI (edvmr1p0) 4> send priex,stats | ||
+ | |||
+ | Sending STATS request to EXTRACT PRIEX ... | ||
+ | |||
+ | Start of Statistics at 2020-11-12 12:46:37. | ||
+ | |||
+ | DDL replication statistics (for all trails): | ||
+ | |||
+ | *** Total statistics since extract started | ||
+ | Operations | ||
+ | |||
+ | Output to ./ | ||
+ | |||
+ | Extracting from OGGSRC.CUSTOMER_PROD to OGGSRC.CUSTOMER_PROD: | ||
+ | |||
+ | *** Total statistics since 2020-11-12 12:46:30 *** | ||
+ | Total inserts | ||
+ | Total updates | ||
+ | Total deletes | ||
+ | Total discards | ||
+ | Total operations | ||
+ | |||
+ | *** Daily statistics since 2020-11-12 12:46:30 *** | ||
+ | Total inserts | ||
+ | Total updates | ||
+ | Total deletes | ||
+ | Total discards | ||
+ | Total operations | ||
+ | |||
+ | *** Hourly statistics since 2020-11-12 12:46:30 *** | ||
+ | Total inserts | ||
+ | Total updates | ||
+ | Total deletes | ||
+ | Total discards | ||
+ | Total operations | ||
+ | |||
+ | *** Latest statistics since 2020-11-12 12:46:30 *** | ||
+ | Total inserts | ||
+ | Total updates | ||
+ | Total deletes | ||
+ | Total discards | ||
+ | Total operations | ||
+ | |||
+ | End of Statistics. | ||
+ | |||
+ | |||
+ | GGSCI (edvmr1p0) 5> | ||
+ | |||
+ | --Target | ||
+ | GGSCI (edvmr1p0) 8> send rkafka, | ||
+ | |||
+ | Sending STATS request to REPLICAT RKAFKA ... | ||
+ | |||
+ | Start of Statistics at 2020-11-12 12:46:47. | ||
+ | |||
+ | Replicating from OGGSRC.CUSTOMER_PROD to OGGTRG.CUSTOMER_PROD: | ||
+ | |||
+ | *** Total statistics since 2020-11-12 12:46:34 *** | ||
+ | Total inserts | ||
+ | Total updates | ||
+ | Total deletes | ||
+ | Total discards | ||
+ | Total operations | ||
+ | |||
+ | *** Daily statistics since 2020-11-12 12:46:34 *** | ||
+ | Total inserts | ||
+ | Total updates | ||
+ | Total deletes | ||
+ | Total discards | ||
+ | Total operations | ||
+ | |||
+ | *** Hourly statistics since 2020-11-12 12:46:34 *** | ||
+ | Total inserts | ||
+ | Total updates | ||
+ | Total deletes | ||
+ | Total discards | ||
+ | Total operations | ||
+ | |||
+ | *** Latest statistics since 2020-11-12 12:46:34 *** | ||
+ | Total inserts | ||
+ | Total updates | ||
+ | Total deletes | ||
+ | Total discards | ||
+ | Total operations | ||
+ | |||
+ | End of Statistics. | ||
+ | |||
+ | |||
+ | GGSCI (edvmr1p0) 9> | ||
+ | </ | ||
+ | |||
+ | Finally, we can consume the data on Kafka: | ||
+ | |||
+ | < | ||
+ | [oracle@edvmr1p0 ~]$ kafka-console-consumer.sh --bootstrap-server localhost: | ||
+ | {" | ||
+ | </ | ||
+ | |||
+ | So, we have configured replication: | ||
+ | Oracle RDBMS -> Golden Gate (Extract) -> Golden Gate (Replicat) -> Apache Kafka | ||
=====Appendix===== | =====Appendix===== |