All SymmetricDS synchronization configurations require database connectivity. As a result questions often arise around the topic of database permissions. Specifically what permissions are required for the SymmetricDS user and do the SymmetricDS tables need to run in the same catalog or schema as the tables to be synchronized.

With such a large variety of databases that are supported by the tool it is difficult to address this topic with one global answer. In reality many of these database platforms have different definitions for catalogs, schemas, and even security roles. As a result this blog will address the topic from conceptual level hoping that you can apply the approach that works best for your scenario.

1. Quick & Easy

Connect your nodes using a database user account that has the same read, write, delete access that your application(s) utilize. As long as this account has the ability to create triggers and functions as well you should be all set. This will allow SymmetricDS to install all configuration and runtime tables that it uses alongside your tables (prefixed with SYM_ by default). The downside to setting up in this manner is that the same database user account will be used for multiple purposes and might make it difficult to differentiate any issues should they arise.

2. Somewhere in the Middle

Provide a newly created and dedicated database user account to be used during SymmetricDS node setup which will default to the same database, catalog, and schema that the tables to be synchronized also reside in. This requires a minimal amount of extra setup to create a new user account that also has the ability to read, write, and delete. Again the SymmetricDS configuration and runtime tables will be created alongside your tables but the different user account will help in debugging any issues.

3. Advanced

In this approach again you will need to create a new dedicated user account for SymmetricDS. You will also setup this user account to use a different database, catalog, and schema. This will ensure the SymmetricDS configuration and runtime tables are created in a different location all together than the location of the tables to be synchronized. This is also where things can get tricky from one database platform to the next. The details of this setup approach will vary from database to database. At a high level though the user account needs to be able to read, write, and update tables in its default location as well as create and alter tables. The user account will also need the ability to read, write, and delete from the database, catalog, schema that the tables to be synchronized reside. Finally the user account will also need the ability to create triggers and functions in this location as well.

See the documentation for a specific example of how to setup permissions using SQL Server

Josh Hicks
Author: Josh Hicks

Josh has worked in the IT industry for over 20 years as a developer, tech lead, and sales engineer. He has worked across a variety of businesses including retail, telecommunications, education, and healthcare. When he is not developing he enjoys whatever sporting event might be taking place.