Menu

Noob here. what do you have to do to get the nodes to create the sym_ * tables on sqlite?

Eric Brown
2019-06-27
2019-07-03
  • Eric Brown

    Eric Brown - 2019-06-27

    Noob here. what do you have to do to get the nodes to create the sym_ * tables on sqlite?

    I followed the tutorial for 3_10 and the system never created the tables and triggers on either of the local
    sqlite dbs

    all of the service error messages are "node not registered" which i can't do, because the tables have not been created yet.

    this is in both my node files

    auto.registration=true

    jobs.synchronized.enable=true

    initial.load.create.first=true

    when i run
    "../bin/dbimport" --engine corp-000 --format XML --alter-case create_sample.xml

    it doesn't change the Db at all, instead creating a Temp<dbname> file (with no extension)
    in the samples folder (or wherever i run it )</dbname>

    subsequent runs say that the table items already exists (my best guess is changes are being made to the new tem p file, but it doenst' have the sqlite .db extension.

    If i modfy the extension i can open the Temp db as a sqlite db.

     

    Last edit: Eric Brown 2019-06-27
  • Eric Brown

    Eric Brown - 2019-07-01

    for those who follow, in the tutorial, there is this, from the tutorial

    •Create the SymmetricDS tables.
    cli../bin/symadmin --engine corp-000 create-sym-tables

    But the trick is, the sqlite driver, it never modifys teh original DB for some reason, you have to copy and rename the temp Db...

    I Never ot any better answer out of anyone here or on SO.

     

    Last edit: Eric Brown 2019-07-01
  • Mark Michalek

    Mark Michalek - 2019-07-03

    Eric, a couple of ideas about the location of the sqlite file:
    1) Could the current working directory be different when you run from command line and when run symmetric?
    2) Are you using a different OS user when you run from the command line vs. run the software?

    Also, usually Symmetric should just create it's sym tables automatically when you startup the software. So using the symadmin create-sym-tables command is not strictly required.

    Mark

     
  • Maxwell Pettit

    Maxwell Pettit - 2019-07-03

    As a follow-up to Mark's answer, I wanted to add that running the exact commands in the quick start tutorial demo section doesn't work for sqlite. These commands work with the H2 demo, because H2 databases by default get placed in the Symmetric tmp dir.

    SQLite databases get created in the current working directory where the command was run. So, running the demo commands from the samples dir creates a corp database in the samples dir. Navigating back to the Symmetric home dir and running bin/sym creates a different corp database in the Symmetric home dir.

    The solution for this is to run all commands from the same working directory (where you want the database to be created in the file system).

     

Log in to post a comment.