Copyright © 2007-2017 JumpMind, Inc

Version 3.8.42

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.

1. Demo

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.

quickstart two tier

1.1. Installation

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.

wizard node setup
Figure 1. Open the web console and click Demo.

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 (explore-execute-all) 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);
demo pull sql

1.2.2. Verify Outgoing Batches

demo pull verify outgoing batch
Figure 2. Verify the outgoing batches were created and sent (status of OK).

1.2.3. Verify Incoming Batches

demo pull verify incoming batch
Figure 3. Verify the incoming batches were received (status of OK).

1.2.4. Verify SQL

Verify the change directly in a store database.

select * from item_selling_price
demo pull verify explore
Figure 4. Verify the new price for store 002 is 1.00
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 corp node and execute (explore-execute-all) 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);
demo push sql

1.3.2. Verify Outgoing Batches

demo push verify outgoing batch
Figure 5. Verify the outgoing batches were created and sent (status of OK).

1.3.3. Verify Incoming Batches

demo push verify incoming batch
Figure 6. Verify the incoming batches were received (status of OK).

1.3.4. Verify SQL

Verify the change directly in the corp database.

select * from sale_transaction;
demo push verify explore 1
Figure 7. Verify the sale transaction from store 001 is present
select * from sale_return_line_item;
demo push verify explore 2
Figure 8. Verify the sale return line item from store 001 is present
Make sure you have selected corp-000 to run your query against.

1.4. Finish

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.

Steps covered
  1. Install

  2. Run

  3. Connect Source Database

  4. Select Tables

  5. Connect Target Database

2.1. Install

Download and install SymmetricDS from the JumpMind website.

For complete installation instructions click here

2.2. Run

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.