SQLserver通过OGG for bigdata对接Kafka

本文详细介绍了如何使用Oracle GoldenGate (OGG) for BigData 将SQLserver的数据对接到Kafka。内容包括OGG的五大进程功能解析,Kafka和OGG的安装步骤,数据对接配置过程,以及在对接过程中遇到的问题和解决方案。
摘要由CSDN通过智能技术生成

1. OGG五大进程的功能


  1. Manager进程是GoldenGate的控制进程,运行在源端和目标端上。它主要作用有以下几个方面:启动、监控、重启Goldengate的其他进程,报告错误及事件,分配数据存储空间,发布阀值报告等。在目标端和源端有且只有一个manager进程

  2. Extract运行在数据库源端,负责从源端数据表或者日志中捕获数据。Extract的作用可以按照阶段来划分为:
    – 初始时间装载阶段:在初始数据装载阶段,Extract进程直接从源端的数据表中抽取数据
    – 同步变化捕获阶段:初始数据同步完成以后,Extract进程负责捕获源端数据的变化(DML和DDL)

  3. Data Pump进程运行在数据库源端,其作用是将源端产生的本地trail文件,把trail以数据块的形式通过TCP/IP 协议发送到目标端,这通常也是推荐的方式。pump进程本质是extract进程的一种特殊形式,如果不使用trail文件,那么extract进程在抽 取完数据以后,直接投递到目标端,生成远程trail文件。

  4. Collector进程与Data Pump进程对应 的叫Server Collector进程,这个进程不需要引起我的关注,因为在实际操作过程中,无需我们对其进行任何配置,所以对我们来说它是透明的。它运行在目标端,其 任务就是把Extract/Pump投递过来的数据重新组装成远程trail文件。

  5. Replicate进程,通常我们也把它叫做应用进程。运行在目标端,是数据传递的最后一站,负责读取目标端trail文件中的内容,并将其解析为DML或 DDL语句,然后应用到目标数据库中。


2. OGG 对接 Kafka

1. Kafka安装

zookeeper

  1. 下载;

  2. 部署;
    – 路径自己选择

  3. 设置环境变量:

     Export zookeeper=/home/**/kafka/zookeeper
     Export PATH=$zookeeper:$PATH
    
  4. 修改zookeeper/conf下的配置文件:

     zoo_sample.cfg ; 
     Datadir :$ZOOKEEPER_HOME/data;端口默认
    
  5. 启动zookeeper:

     zookeeper/bin/.zkSerer.sh start  sudo 执行
    
If the Debezium Kafka Connect for SQL Server topic is missing, you can try the following steps: 1. First, check the configuration of the Kafka Connect source connector for SQL Server. You should ensure that the connector configuration includes the correct topic name for the Debezium SQL Server source connector. The topic name should be specified in the "topic.prefix" or "topic.name" configuration property, depending on the version of Debezium you are using. 2. If the topic name is specified correctly in the connector configuration, you can try restarting the Kafka Connect worker and the Debezium SQL Server source connector. This may help to resolve any issues that are preventing the topic from being created. 3. If the topic still does not exist after restarting the Kafka Connect worker and connector, you can try creating the topic manually using the Kafka command line tools. For example, you can use the following command to create a new topic with a replication factor of 1 and a partition count of 3: ``` bin/kafka-topics.sh --create --bootstrap-server <kafka_broker>:<kafka_port> --replication-factor 1 --partitions 3 --topic <topic_name> ``` Replace `<kafka_broker>` and `<kafka_port>` with the hostname and port of your Kafka broker, respectively, and `<topic_name>` with the name of the missing topic. 4. If none of the above steps work, you may need to investigate further to identify the root cause of the issue. You can check the Kafka Connect and Debezium logs for any error messages or warnings that may provide more information on the issue.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值