What is obcdc_tailf?
obcdc_tailf is a simple binary file that calls OceanBase Change Data Capture (obcdc) to generate incremental data of OceanBase Database. It exports the data obtained from obcdc to a file or the screen in a specified format. You can check the incremental transaction data of OceanBase Database by using obcdc.
Use obcdc_tailf
Startup options
You can run the ./bin/obcdc_tailf -h command to view the startup options of obcdc_tailf and their description. Ensure 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 needs.
| Option | Independent | Description |
|---|---|---|
| -f | No | The path of the obcdc configuration file. Enter the configuration file path after the option name. For more information about the configuration file, see obcdc parameters. |
| -d | Yes | Specifies to run obcdc in the background. |
| -D | No | The path of the output data file. Enter the data file path after the option name. |
| -h | Yes | Specifies to generate the help information. |
| -H | Yes | The path for generating the output security timestamp information. Enter the path of the security timestamp file after the option name. |
| -o | Yes | The screen output data. |
| -O | Yes | Specifies to generate only the hexadecimal data, such as NCHAR, NVARCHAR, and VARCHAR data. In this case, other columns are not generated. |
| -V | Yes | Specifies to enable the verification mode and generate unique IDs of row data. |
| -v | Yes | Specifies to generate the version information. |
| -t | No | Specifies to use the timestamp in seconds to start obcdc. Enter the value of the timestamp after the option name. |
| -T | No | Specifies to use the timestamp in milliseconds to start obcdc. Enter the value of the timestamp after the option name. |
| -R | No | The running time. |
| -x | Yes | Specifies to additionally generate hexadecimal data for some columns. |
| -m | Yes | Specifies to generate MD5 hash values for columns of the large object (LOB) type. |
| -i | Yes | Specifies to generate the details (the hidden primary key information) of LogRecords. |
| -c | Yes | Specifies to generate only the data CRC32 checksums of DML transactions. |
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 find 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 find the path oflibobcdc.so.4.[admin@test001 ~]$ find / -name libobcdc.so.4The path of
libobcdc.so.4is returned iflibobcdc.so.4exists in the environment, as shown in the following example:/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/