I am trying to set up a test where I can synchronize two remote databases simultaneously with the consolidated DB. So in my Java application, I use two threads and each of the thread would then execute the SQL statement, "SYNCHRONIZE PROFILE myprofile", which in turn will start the dbmlsync process.

The problem I've encountered is that when the second thread started, I'd always get the following error:

java.sql.SQLException: [Sybase][JDBC Driver][SQL Anywhere]The database server failed to shut down the dbmlsync server
    at sybase.jdbc4.sqlanywhere.IIStatement.execute(Native Method)
    at sybase.jdbc4.sqlanywhere.IStatement.execute(IStatement.java:327)
    at com.sap.mobilink.SyncDB.run(SyncPerformanceTest.java:34)
    at java.lang.Thread.run(Unknown Source)

If I run the sync sequentially, it works, but not when I try to start the sync simultaneously. Does anyone know why it's the case?

asked 31 Aug '14, 02:00

wlin's gravatar image

wlin
31114
accept rate: 0%

edited 31 Aug '14, 13:31

Breck%20Carter's gravatar image

Breck Carter
26.9k437609883

1

...I can synchronize two remote databases simultaneously with the consolidated DB...

...I use two threads and each of the thread would then execute the SQL statement, "SYNCHRONIZE PROFILE myprofile"

Just to understand: So each thread does use a connection to a different database and will try to sync a profile for the according database?

(31 Aug '14, 05:06) Volker Barth

That's correct. Both remote databases are installed on the same machine. And each thread starts a separate connection to the remote database. Each of these remote databases has its own sync profile.

(31 Aug '14, 14:26) wlin

Please show us all the SQL statements and options involved in this operation. I'm guessing that two separate dbmlsync processes are needed if you want to do two syncs in parallel, with different ports for communicating between your application and the dbmlsync processes; e.g., PORT 4433 and PORT [something-else]... the symptom seems to be saying some process is confused :)

permanent link

answered 31 Aug '14, 17:24

Breck%20Carter's gravatar image

Breck Carter
26.9k437609883
accept rate: 21%

Yes, that was it. I had to manually assign different port numbers to the different threads. Thanks!

(01 Sep '14, 02:50) wlin
Replies hidden

Feel free to mark that answer as "accepted" - by clicking on the according "check" image on the left:)

(01 Sep '14, 03:25) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×298
×77
×20

question asked: 31 Aug '14, 02:00

question was seen: 818 times

last updated: 01 Sep '14, 03:25