Copyright © 2007-2021 JumpMind, Inc
Permission to use, copy, modify, and distribute this SymmetricDS Tutorials Guide for any purpose and without fee is hereby granted in perpetuity, provided that the above copyright notice and this paragraph appear in all copies.
This guide explains how to quickly setup a demonstration of SymmetricDS to help you understand what a working system looks like.
Three nodes, which represent three embedded databases, will be installed. One node will represent a centralized corporate database and the other two nodes will represent two individual retail store databases.
For information on how to install SymmetricDS, please refer to the Installation section of the SymmetricDS User Guide.
1.1.1. Creating and Starting
The Demo button will automatically install three
nodes with synchronization pre-configured. This will allow
you to see a working model of SymmetricDS.
1.1.2. Initial Load
An initial load is the process of seeding tables at a target node with data from a source node. Instead of capturing data, data is selected from the source table using a SQL statement and then it is streamed to the client.
By default, the Demo does this action for you. However, it is worth noting that Initial Loads can be sent through the Manage→Nodes screen.
1.1.3. What’s Created
The demo databases are H2 Databases. You can connect to them using a sql explorer tool like Squirrel Sql. The connection information can be found in the properties files in the engines directory.
Please verify the databases by navigating to the Explore tab and using the database explorer on the left.
Find the item tables that sync from root to client (that is, from corp to store): item and item_selling_price.
Find the sales tables that sync from store to corp: sale_transaction and sale_return_line_item.
Validate the corp item tables have sample data.
1.2. Pulling Data
Next, we will make a change to the item data in the central office corp node database (we’ll add a new item), and observe the data being pulled down to the store.
1.2.1. Create Data
Create data in corp for all stores to pull.
Navigate to the SQL Explorer for the corp node and execute () the following scripts.
insert into item (item_id, name) values (110000055, 'Soft Drink'); insert into item_selling_price (item_id, store_id, price) values (110000055, '001', 0.65); insert into item_selling_price (item_id, store_id, price) values (110000055, '002', 1.00);
1.2.2. Verify Outgoing Batches
1.2.3. Verify Incoming Batches
1.2.4. Verify SQL
Verify the change directly in a store database.
select * from item_selling_price
|Make sure you have selected either store-001 or store-002 to run your query against.|
1.3. Pushing Data
We will now simulate a sale at the store and observe how SymmetricDS pushes the sale transaction to the central office.
1.3.1. Create Data
Create data in a store to be pushed to corp. Navigate to the SQL Explorer for the store node and execute () the following scripts.
insert into sale_transaction (tran_id, store_id, workstation, day, seq) values (1000, '001', '3', '2014-03-21', 100); insert into sale_return_line_item (tran_id, item_id, price, quantity) values (1000, 110000055, 0.65, 1);
1.3.2. Verify Outgoing Batches
1.3.3. Verify Incoming Batches
1.3.4. Verify SQL
Verify the change directly in the corp database.
select * from sale_transaction;
select * from sale_return_line_item;
|Make sure you have selected corp-000 to run your query against.|
Congratulations! You have completed the Demo.
Continue to browse through the demo configuration to see how basic triggers, routers, group links and more are setup. When you are ready, uninstall the demo and begin your own configuration.
2. Quick Start
|To see a demonstration of a preconfigured SymmetricDS environment see the Demo tutorial.|
This guide will walk you through the minimum steps required to setup data synchronization through a single installation of SymmetricDS.
Connect Source Database
Connect Target Database
Download and install SymmetricDS from the JumpMind website.
|For complete installation instructions click here|
Open the control center to verify SymmetricDS server is running. If it is not start the server using the start server button. Then open the web console using the open web console button.
|Depending on your operating system a program shortcut for the control center might have been setup. Otherwise you can find it directly in the /bin directory of your SymmetricDS installation. The executable file is named symcc.|
2.3. Connect Source Database
Select "Master Node" from the node setup wizard
Provide JDBC connection information for your source database, hit next
Select "Standard 2 Tier" profile, hit next
Use the default sync url, hit next
Provide a password for the web console, hit next
|For complete instructions creating the master node click here|
2.4. Select Tables
The Quick Config wizard will be displayed by default when configuration is missing. If it is closed or not visible it can be opened by hitting the "Quick Config" button on the Overview screen of the Configure tab.
Welcome, hit next
Select tables you wish to sync from client to server, hit next
Select tables you wish to sync from server to client, hit next
Verify the summary, hit finish
|For complete instructions for the quick config wizard click here|
2.5. Connect Target Database
The Add Node wizard will be displayed by default when only one node has been configured. If it is closed or not visible it can be opened by hitting the "Add" button on the Nodes screen of the Manage tab.
Select Local Node, hit next
Provide JDBC connection information for your target database, hit next
Select default registration url, hit next
Select client node group, hit next
Provide an external id of 1, hit next
Select default sync url, hit next
Choose appropriate options here depending if your target tables already exist and if they should be initially loaded with data from the source. Hit next
|For complete instructions to setup the target database click here|
Congratulations! You have completed the Quick Start.