Menu

DBRole not taken into account

Help
Gautier D.
2015-06-17
2015-06-17
  • Gautier D.

    Gautier D. - 2015-06-17

    Hello,

    I'm facing an issue with SymmetricDS (v3.7.19) synchronizing a bunch of Firebird (v2.5.4) databases.

    Each database is used by an application taking advantage of application-triggers to get notified when some tables are updated. This application needs to know if an update is due to a SymmetricDS synchronization or a manual update (using a DB Client app, like Flamerobin for instance).

    The application triggers use the CURRENT_ROLE variable to insert a new row in a 'Changes' table (along with other fields like TableName, ID, and so on). Thus the application just needs to read this table to detect the latest updates and their authors.

    While this works perfectly with a DB Client app (after specifying the appropriate DB Role when connecting the DB), SymmetricDS synchronizations induce new rows in the 'Changes' table with DBRole = 'NONE'.

    SymmetricDS properties files contain this specific line in order to set the DBRole:

    db.connection.properties=ISC_DPB_SQL_ROLE_NAME=SYNCHRONIZER;ISC_DPB_LC_CTYPE=ISO8859_1

    (I would like synchronizations to use the SYNCHRONIZER DBRole).

    The SymmetricDS output shows that it's properly detected but I only have 'NONE' in the DBRole field of table 'Changes':

    [] - BasicDataSourceFactory - Setting database connection property ISC_DPB_SQL_ROLE_NAME=SYNCHRONIZER
    [] - BasicDataSourceFactory - Setting database connection property ISC_DPB_LC_CTYPE=ISO8859_1
    [root-000] - BasicDataSourceFactory - Setting database connection property ISC_DPB_SQL_ROLE_NAME=SYNCHRONIZER
    [root-000] - BasicDataSourceFactory - Setting database connection property ISC_DPB_LC_CTYPE=ISO8859_1
    [root-000] - JdbcDatabasePlatformFactory - Detected database 'Firebird 2.5.WI-V2.5.4.26856 Firebird 2.5/tcp (PCUGT73)/P10', version '2', protocol 'firebirdsql'
    [root-000] - JdbcDatabasePlatformFactory - The IDatabasePlatform being used is org.jumpmind.db.platform.firebird.FirebirdDatabasePlatform
    [root-000] - Firebird21SymmetricDialect - The DbDialect being used is org.jumpmind.symmetric.db.firebird.Firebird21SymmetricDialect

    Am I missing something or doing something wrong?
    Thanks for your help.

     

    Last edit: Gautier D. 2015-06-17
  • Chris Henson

    Chris Henson - 2015-06-17

    Based on the jaybird jdbc manual (http://www.firebirdsql.org/file/documentation/drivers_documentation/Jaybird_2_1_JDBC_driver_manual.pdf), it looks like you can specify the role name in the jdbc url.

    jdbc:firebirdsql://host:port//var/lib/firebird/data/database?sql_role_name=SYNCHRONIZER
    
     
  • Gautier D.

    Gautier D. - 2015-06-17

    Wow, quick and efficient answer, it works!
    I appreciate your help, thanks!

     

Log in to post a comment.