-1

I took over a project that uses SymmetricDs to sync tables between a target and a source. The tables from the source aren't syncing to the target at the moment. I have searched online but found no help.

I have checked the sym_outgoing_batch and sym_incoming_batch tables but can't figure out the use of the information there.

I also queried the sync_trigger table. I have the result of the query as a link below.

If you have an idea on where I could look, please let me know. I can run queries and give you the result.sync_trigger result

Dikum
  • 31
  • 3

1 Answers1

0

Uncomment these lines "--where status != 'OK'" to see if anything is NOT in OK state if there is that is causing the SYNC to STOP

-- SQL QUERY

-- Symmetric DS : MONITOR : HEARTBEAT / INCOMING / OUTGOING / MONITOREVENTS

SELECT node_id, host_name, getdate() as dtNOW ,heartbeat_time FROM [tablename].[dbo].[sd_node_host] with (NOLOCK) where  heartbeat_time > '2022-01-01'

--SELECT * FROM [tablename].[dbo].[sd_context] with (NOLOCK)

SELECT * FROM [tablename].[dbo].[sd_outgoing_batch] with (NOLOCK)
--where status != 'OK'
order by create_time desc

SELECT * FROM [tablename].[dbo].[sd_incoming_batch] with (NOLOCK)
--where status != 'OK'
order by create_time desc

-- Symmetric DS : MONITOR

SELECT * FROM [tablename].[dbo].[sd_monitor_event] with (NOLOCK) WHERE is_resolved != 1

SELECT * FROM [tablename].[dbo].[sd_monitor_event] with (NOLOCK)

EDIT

here is the link for the symmetricds user guide.

https://www.symmetricds.org/doc/3.13/html/user-guide.html#_outgoing_batch

basically NE means it is ready for replication. Did you ever have it set up or is this a new setup that you are trying to get started?

EDIT 2 ENGINE CONFIGS

MAIN

engine.name=<SDS_MAIN>

db.driver=net.sourceforge.jtds.jdbc.Driver
db.url=jdbc:jtds:sqlserver://<IP>:1433/<DB>;useCursors=true;bufferMaxMemory=10240;lobBuffer=5242880
db.user=***********
db.password=***********

registration.url=
sync.url=ttp://<IP>:<PORT>/sync/<SDS_MAIN>

group.id=<GID>
external.id=000

auto.registration=true
initial.load.create.first=true

sync.table.prefix=sym
#start.initial.load.extract.job=false

compression.level=-1
compression.strategy=0

CHILD

engine.name=<SDS_CHILD>

db.driver=net.sourceforge.jtds.jdbc.Driver
db.url=jdbc:jtds:sqlserver://<IP>:1433/<DB>;useCursors=true;bufferMaxMemory=10240;lobBuffer=5242880
db.user=***********
db.password=***********

registration.url=http://<IP>:<PORT>/sync/<SDS_MAIN>
sync.url=http://<IP>:<PORT>/sync/<SDS_CHILD>

group.id=<GID>
external.id=100

auto.registration=true
initial.load.create.first=true

sync.table.prefix=sym
start.initial.load.extract.job=false

compression.level=-1
compression.strategy=0
EST
  • 407
  • 1
  • 7
  • 10
  • I ran the query on the server DB. No record was returned for the sym_incoming_batch table. But some records were returned for the outgoing table. All the channel Ids are "heartbeat" and all status "NE" – Dikum Jun 24 '22 at 09:11
  • The current status of a batch can be routing (RT), requested to be extracted in the background (RQ), newly created and ready for replication (NE), being queried from the database (QY), sent to a node (SE), ready to be loaded (LD), resend requested because missing in staging (RS), acknowledged as successful (OK), ignored (IG), or in error (ER). – EST Jun 24 '22 at 17:46
  • Used for tracking the sending a collection of data to a node in the system. A new outgoing_batch is created and given a status of 'NE'. After sending the outgoing_batch to its target node, the status becomes 'SE'. The node responds with either a success status of 'OK' or an error status of 'ER'. An error while sending to the node also results in an error status of 'ER' regardless of whether the node sends that acknowledgement. – EST Jun 24 '22 at 17:48
  • It looks like it is not sending the batch. you need to look at the logs of both the servers in the logs folder of symmetricds and see what it is doing. – EST Jun 24 '22 at 17:49
  • I think you need to put this line in your engine config initial.load.create.first=true – EST Jun 24 '22 at 18:00