Configure DBSync
Configuring a DBSync system includes extra tasks to create the extensions and configure the database. Perform the overall configuration as follows:
Steps
-
Download the appropriate Java database connectivity (JDBC) driver to PingDataSync’s
/PingDataSync/lib
directory. -
Open the
java.properties
file with a text editor and append thejdbc.drivers
argument and fully qualified JDBC driver class name tostart-server.java-args
. Save the file.Example:
To use the Microsoft SQL Server JDBC driver, modify
start-server.java-args
as follows:start-server.java-args=-d64 -server -Xmx256m -Xms256m -XX:+UseConcMarkSweepGC -Djdbc.drivers=com.microsoft.sqlserver.jdbc.SQLServerDriver
-
When using custom JDBC endpoints, SQL statements can’t be called unless JDBC drivers are set in the
java.properties
file. -
When setting multiple JDBC drivers, use a
:
to separate each driver’s fully qualified class name.
-
-
Run the
dsjavaproperties
command to apply the change. -
Restart the server to load the new driver into the runtime.
-
Create one or more JDBC extensions based on the Server SDK. If you’re configuring for bidirectional synchronization, you need two scripts: one for the JDBC sync source and the other for the JDBC sync destination. Put the compiled extensions in the
/lib/extensions
directory. -
Configure the database change log table and triggers (presented later). Each table requires one database trigger to detect the changes and load them into the change log table.
Even if you use the vendor’s native change tracking mechanism, you should also configure a change log table.
-
Configure the sync pipes, sync classes, external servers, distinguished name (DN) maps, and attribute maps for one sync direction.
-
Run the
resync --dry-run
command to test the configuration settings. -
Run
realtime-sync set-startpoint
to initialize the starting point for synchronization. -
Run the
resync
command to populate data on the destination endpoint. -
Start the sync pipes using the
realtime-sync start
command. -
Monitor PingDataSync using the status commands and logs.
-
For bidirectional synchronization, configure another sync pipe and repeat steps 5 – 9 to test the system.