What is obcdc_tailf?
obcdc_tailf is a simple binary file that calls OceanBase Change Data Capture (obcdc) to output incremental data of OceanBase AI Database. It exports the data obtained from obcdc to a file or the screen in a specified format. You can use it to try out obcdc and observe the incremental transaction data of OceanBase AI Database.
Use obcdc_tailf
Startup options
You can run the ./bin/obcdc_tailf -h command to view the startup options of obcdc_tailf and their descriptions. Make sure that the runtime environment can connect to all required dynamic libraries.
Note
When you use the startup options of obcdc_tailf to specify a file path, both relative and absolute paths are supported to meet different requirements.
Option |
Independent |
Description |
|---|---|---|
| -f | N | The path of the obcdc configuration file. Enter the configuration file path after the option. For more information about how to configure the file, see obcdc parameters. |
| -d | Y | Runs obcdc in the background. |
| -D | N | The file for outputting data. You can specify any file type. Enter the data file path after the option. |
| -h | Y | Outputs help information. |
| -H | Y | Outputs safe checkpoint information. Enter the path of the safe checkpoint file after the option. |
| -o | Y | Outputs data to the screen. |
| -O | Y | Outputs only hexadecimal values for columns of types such as NCHAR, NVARCHAR, and VARCHAR. Values of other columns are not output. |
| -V | Y | Enables the verification mode to output the unique ID of row data. |
| -v | Y | Outputs version information. |
| -t | N | Starts obcdc with a timestamp in seconds. Enter the timestamp value after the option. |
| -T | N | Starts obcdc with a timestamp in milliseconds. Enter the timestamp value after the option. |
| -R | N | Specifies the running time. |
| -x | Y | Additionally outputs hexadecimal values for some columns. |
| -m | Y | Outputs the MD5 value of LOB-type columns. |
| -i | Y | Outputs detailed information of the LogRecord, currently including the hidden primary key information. |
| -c | Y | Outputs only the checksum value of DML transaction data (CRC32 algorithm). |
FAQ
What do I do if the following error occurs due to the missing dynamic library libobcdc.so.4 when I run the obcdc_tailf command?
./bin/obcdc_tailf: error while loading shared libraries: libobcdc.so.4: cannot open shared object file: No such file or directory
You can use the find command to locate the path of libobcdc.so.4 and then set the environment variable to specify the dynamic library search path. The procedure is as follows:
Run the
findcommand to locate the path oflibobcdc.so.4.[admin@test001 ~]$ find / -name libobcdc.so.4If
libobcdc.so.4exists in the environment, its path is returned, as shown below:/home/admin/oceanbase-ce/lib/libobcdc.so.4Set the
LD_LIBRARY_PATHenvironment variable to specify the dynamic library search path.[admin@test001 ~]$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/admin/oceanbase-ce/lib/