solidDB Help : Samples : Linked Library Access with Advanced Replication sample
  
Linked Library Access with Advanced Replication sample
This sample C application demonstrates how to use the solidDB Linked Library Access (LLA) server with the Advanced Replication component.
The files for the sample are located in the soliddb-installdir\samples\aclib_smartflow directory.
Note To run this sample, your solidDB license file must have the solidDB LLA component enabled.
For general information about running the samples, see Samples.
Note LLA was previously known as Accelerator.
The sample comprises of two C programs that are run at the same time and interact with each other:
acsrv: an application that runs an LLA server and acts as the Advanced Replication master server. The sample uses SSC API calls to complete the following actions:
Start the LLA Advanced Replication master server by using the function ‘SSCStartServer’, with the listen name as specified in the solid.ini file (‘tcp 2315’), and the user name, password, and catalog names as specified on the command line (‘dba’).
Serve the network clients and run all the background tasks until the server is shutdown remotely.
acsNet: an application that runs an LLA server that acts as the Advanced Replication replica server and runs the client activity. The sample assumes that a master server is running and listening on ‘tcp 2315’. The sample uses SSC API and ODBC API calls to complete the following actions:
Start the LLA Advanced Replication replica server by using the function ‘SSCStartServer’. The sample uses the default catalog name, user name, and password of 'dba', and a listen name of 'tcp 2316'.
Connect to the server by using ODBC API SQLConnect with user name 'dba'.
Create a table in both master and replica databases.
Set SYNCHISTORY ON on the table in both master and replica databases.
Create a publication in the master database.
Register the publication from the replica database.
Insert some records in the replica database.
Propagate the saved records from the replica to the master database.
Subscribe records from the master to the replica database.
Select records from the table in the replica database.
Unregister the publication from the replica database and drop the publication in the master database.
Drop the table after turning off SYNCHISTORY in both master and replica database.
Drop master from replica database and replica from master database.
Disconnect from the replica server.
Stop the LLA server (replica) by using 'SSCStopServer'.
Running the sample
Run the runme script (runme.bat in Windows), which both compiles and runs the applications, and shuts down the master server by using solcon (after the acsNet application terminates).
Go up to
Samples