![]() |
SyncTables consists of 2 programs.
|
|
The graphical User Interface program (SyncTables_gui.exe) is a wizard which helps you in 6 easy steps to enter the configuration data required for copying/synchronizing. Wizard – step 1 - Sessionfile
You can open an existing configuration sessionfile or create a new empty configuration sessionfile.
Wizard – step 2 – Databases
Select your source and destination databases. For different databases different configuration data is required. For a database on the same computer use “localhost” as Host. You don’t have to fill in the Port when the standard Port is used. When connecting to a MySQL database on a webhoster server then choose “MySQL + http-tunnel” as database. Upload the PHP file “synctables.php” from the program directory to your webhost and write the URL of this file in the inputfield. The protocols http and https can both be used. With https a self-signed certificate can be used. The data in the source table is safe! This program never writes anything to the source database. Options: For the destination database Foreign Key checking can be turned off during insert. This is advisable when tables in your database depend on some of the tables transferred in this session.
Wizard – step 3 – Tables
On the left part of the screen all tables of the source database are shown. After selecting a table you can choose the copy/sync-mode with the pulldown on the right part of the screen. Copy: All records from the table are copied from source to destination. To minimise the time that the data is not available on the destination database a temporary table is created first on the destination database. This temporary table is filled with data from the source database. At the end the table is renamed to the correct name. Tables that are configured for copying have a red flag before the tablename. One-Way-Sync: Only records that changed since the last synchronization are transferred from source to destination. To determine these records a column with the last-modified datetime is necessary in the source table. The name of this column is selected in a pulldown. There are 2 additional options: -
“Delete
records that are in destination but not in source” -
“Do copy
complete on SQL-error for insert or update” Tables that are configured for synchronizing have a green flag before the tablename. In the licensed version the target table can have a different name than the source table.
Wizard – step 4 – Pre- and post-commands
On this screen database commands (SQL) can be defined that are executed in the source and target database before and after the copy/synchronize process. The SQL commands need to be in the language of the respective database.
When an http-PHP-tunnel is used also PHP-files can be included.
The screen consists of 4 inputfields:
Wizard – step 5 – Options
-
“On
error” … -
“Verbose” -
“Enforce name
compatibility” -
“strip Access
Ole image headers” -
“delete
temporary tables when an error occurred”
Wizard – step 6 – Save
In this screen the sessionfile can be saved and save as a different filename. The default extension is .sync . With the button “Execute Session Now” the session can be started. The sessionfile needs to be saved before the button is enabled. With the button “Schedule Session Using Windows Scheduler” the session can be entered into the Windows Scheduler. With the Windows Scheduler the copy or synchronize program can be started every day, every hour and in other intervals to keep your databases synchronous. |
The commandline program does the real work of copying or synchronizing.
The program is called SyncTables.exe and the parameter is the .sync file to execute.
When an http-tunnel is used the PHP-file which is in the program directory must be copied to the webserver so that the URL which was entered in the GUI is correct.
Essential data is logged on screen and in a logfile with the same filename but the extension is .log .
An extended logfile with more information (e.g. for debugging) is written when in the configuration screen the option "verbose" is checked.
When an error occurs during "Copy Table" all temporary tables on the destination database are deleted when the option “delete temporary tables when an error occurred” is checked on the options page. Otherwise the temporary tables are left in the destination database. The name of these tables starts with the current date and time.
When an error occurs during "One-Way-Sync" the process is stopped when the pulldown on the options page is set to this option. Otherwise the process will continue with the next record in the table. In the latter case certain records in the destination table may not be correct.
Data in the source tables is never changed in any way by SyncTables. An error during the copy or sync process will still keep your source data safe!
![]() |
After having bought SyncTables you will receive a serial key by email. Here is described how to enter the serial key in the program. |