GET_POSITION
有效對象
擷取 (僅限資料汲取) 和 Replicat
說明
使用 GET_POSITION 函數可取得 Extract 資料汲取或 Replicat 在 Oracle GoldenGate 歷程檔中的讀取位置。
語法
#include "usrdecs.h"
short result_code;
ERCALLBACK (GET_POSITION &position_def, &result_code);
緩衝區
typedef struct
{
char *position;
long position_len;
short position_type;
short ascii_or_internal;
} position_def;
輸入
<position_len>
職位長度的配置長度。
<position_type>
可為下列其中之一:
STARTUP_CHECKPOINT
歷程檔中的開始位置。
CURRENT_CHECKPOINT
歷程檔中上次讀取的位置。
column_value_mode
傳送資料欄值時所使用的格式指標。目前只支援預設的 Oracle GoldenGate 正規格式,以下列方式表示:
EXIT_FN_RAW_FORMAT
輸出
* 位置
代表位置值的緩衝區指標。此緩衝區在 position_def 中宣告為兩個二進位值 (未簽署的 int32t 和 int32t) 作為 seqnorba,代表 char 欄位中的八個位元組。使用者出口程式必須將資料移至正確的資料類型。在 Little Endian 平台上使用此函數會讓程序個別在兩個欄位上「反轉位元組」。
傳回值
EXIT_FN_RET_INVALID_CONTEXT
EXIT_FN_RET_NOT_SUPPORTED
EXIT_FN_RET_OK