If you are new to solidDB® data synchronization, solidDB® Advanced Replication User Guide contains information about how to use the sample scripts provided with solidDB®.
Before you run the sample C application acsnet.c (under directory samples/aclib_replication), it is recommended that you become familiar with solidDB® functionality by doing at least one of the following:
▪Use solidDB® without SMA or LLA to run the SQL scripts contained in solidDB® Advanced Replication User Guide. These scripts are found in samples/replication.
▪Run the SQL scripts locally, using the solidDB® SMA or LLA. As a prerequisite, you are required to set up an application to start the server according to the instructions in this document.
Note You cannot use the SA API to run synchronization commands.
▪Running the implementation sample file aclibstandalone.c, which with the linked library access library, emulates a normal server. The sample file is located in directory samples/aclib.
After using any of these methods, it is possible to run all the steps in the section Getting started with data synchronization in the solidDB® Advanced Replication User Guide using solidDB® SQL Editor (solsql).
Setting up your ODBC application with the advanced replication sample scripts
You can build an ODBC application, similar to the sample C application acsNet.c, to execute all statements required to set up, configure, and run a synchronizing environment. You can find acsNet.c under directory samples/aclib_replication.
To set up sample databases for use with an ODBC client application, you can execute sample scripts replica3.sql, replica4.sql, replica5.sql, and replica6.sql, all of which you can find in the samples/replication/eval_setup directory. These sample scripts contain SQL statements that write new data to replicas and control the execution of synchronization messages. These scripts can be run independently through the solidDB® SQL Editor (solsql).
Alternatively, you can embed the SQL statements into a C/ODBC application, compile, and link it directly to the linked library access library. When linked with the linked library access, the sample scripts allow you to get the performance benefit inherent in linked library access’s architecture.
The sample program embed.c in the samples/odbc directory illustrates how to set up databases with an ODBC client application using linked library access. You can insert the SQL commands from the sample scripts, such as replica3.sql, into the embed.c application.