oracle 退出用户,Oracle Golden Gate用户退出 - EXIT_CALL_PROCESS_RECORD未通过

我在Oracle Golden Gate中有create custom User Exit问题。 我需要连接到数据库复制期间的更改流,并创建此更改的JSON字符串。Oracle Golden Gate用户退出 - EXIT_CALL_PROCESS_RECORD未通过

在这一刻我已经从甲骨文12C到12C甲骨文一种完全可行的数据库复制,我创建了一个发送到由金门提取sended日志事件一个简单的库。

一切正常,到了这一刻,我需要赶上EXIT_CALL_PROCESS_RECORD,因为这种类型的事件包含表名,列和数据(Exit Call Types) 但由于某些原因,此事件不会出现在报告文件我只有三种类型事件:

EXIT_CALL_CHECKPOINT

EXIT_CALL_BEGIN_TRANS

EXIT_CALL_END_TRANS

我如何可以调用EXIT_CALL_PROCESS_RECORD呼叫类型?

这是我目前的配置和退出用户的源代码:

数据挖掘:

EXTRACT REXT1

EXTTRAIL ./dirdat/Z1

TRANLOGOPTIONS DBLOGREADER

GETUPDATEBEFORES

FETCHOPTIONS FETCHPKUPDATECOLS

USERID [email protected]:32774/xe , PASSWORD GGUSER

TABLE ERP.*;

数据泵:

EXTRACT REXT2

DISCARDFILE ./dirrpt/eqalap.dsc, PURGE

RMTHOST 127.0.0.1, MGRPORT 7851, COMPRESS

RMTTRAIL ./dirdat/Z2

CUSEREXIT hello.so CUSEREXIT, INCLUDEUPDATEBEFORES

NOPASSTHRU

MAP ERP.*, TARGET HRMS.*;

Replicat:

replicat RREP1

setenv (NLS_LANG = AMERICAN_AMERICA.WE8MSWIN1252)

useridalias GGTARGETADMIN domain OGG

handlecollisions

assumetargetdefs

CUSEREXIT hello.so CUSEREXIT, INCLUDEUPDATEBEFORES

map HRMS.* target HRMS.* ;

用户出口的源代码:

#include

#include

#include

#include

#include

#include "usrdecs.h"

#include

#include

#include

#include

using namespace std;

extern "C" {

void ERCALLBACK(ercallback_function_codes function_code, void *buf, short *presult_code);

void call_callback(ercallback_function_codes function_code, void *buf, short *result_code);

void output_msg(char *msg, ...);

void CUSEREXIT(exit_call_type_def exit_call_type, exit_result_def *exit_call_result, exit_params_def *exit_params);

}

void ERCALLBACK(ercallback_function_codes function_code, void *buf, short *presult_code);

void call_callback(ercallback_function_codes function_code, void *buf, short *result_code);

void CUSEREXIT(exit_call_type_def exit_call_type, exit_result_def *exit_call_result, exit_params_def *exit_params);

void call_callback(ercallback_function_codes function_code, void *buf, short *result_code) {

ERCALLBACK(function_code, buf, result_code);

}

void output_msg(char *msg, ...) {

short result_code;

char temp_msg[1000];

va_list args;

vsprintf(temp_msg, msg, args);

call_callback(OUTPUT_MESSAGE_TO_REPORT, temp_msg, &result_code);

}

void CUSEREXIT(exit_call_type_def exit_call_type, exit_result_def *exit_call_result, exit_params_def *exit_params) {

short result_code;

switch (exit_call_type) {

case EXIT_CALL_START:

output_msg((char*)"EXIT_CALL_START\n", result_code);

break;

case EXIT_CALL_BEGIN_TRANS:

output_msg((char*)"EXIT_CALL_BEGIN_TRANS\n", result_code);

break;

case EXIT_CALL_PROCESS_RECORD:

output_msg((char*)"EXIT_CALL_PROCESS_RECORD\n", result_code);

break;

case EXIT_CALL_DISCARD_ASCII_RECORD:

output_msg((char*)"EXIT_CALL_DISCARD_ASCII_RECORD\n", result_code);

break;

case EXIT_CALL_DISCARD_RECORD:

output_msg((char*)"EXIT_CALL_DISCARD_RECORD\n", result_code);

break;

case EXIT_CALL_END_TRANS:

output_msg((char*)"EXIT_CALL_END_TRANS\n", result_code);

break;

case EXIT_CALL_CHECKPOINT:

output_msg((char*)"EXIT_CALL_CHECKPOINT\n", result_code);

break;

case EXIT_CALL_PROCESS_MARKER:

output_msg((char*)"EXIT_CALL_PROCESS_MARKER\n", result_code);

break;

case EXIT_CALL_STOP:

output_msg((char*)"EXIT_CALL_STOP\n", result_code);

break;

case EXIT_CALL_DISCARD_TRANS_RECORD:

output_msg((char*)"EXIT_CALL_DISCARD_TRANS_RECORD\n", result_code);

break;

case EXIT_CALL_ABORT_TRANS:

output_msg((char*)"EXIT_CALL_ABORT_TRANS\n", result_code);

break;

case EXIT_CALL_EVENT_RECORD:

output_msg((char*)"EXIT_CALL_EVENT_RECORD\n", result_code);

break;

case EXIT_CALL_FATAL_ERROR:

output_msg((char*)"EXIT_CALL_FATAL_ERROR\n", result_code);

break;

default:

output_msg((char*)"default\n", result_code);

break;

}

*exit_call_result = EXIT_OK_VAL;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值