Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

I have finished a migration from sa 11 to sa 17.0.0.1359 and ran into an interesting problem of having syncs fail because the ml_database table was locked. Here is the log.

W. 2016-03-26 15:18:11. <4> [10050] ODBC: [SAP][ODBC Driver][SQL Anywhere]User 'syncnow' has the row in 'ml_database' locked (ODBC State = 40001, Native error code = -210)
E. 2016-03-26 15:18:11. <4> [-10343] The remote database identified by remote ID '59dacbc4-eac4-418a-b2e1-ebe30700e4f8
W. 2016-03-26 15:28:11. <main> [10050] ODBC: [SAP][ODBC Driver][SQL Anywhere]User 'syncnow' has the row in 'ml_database' locked (ODBC State = 40001, Native error code = -210)
W. 2016-03-26 15:28:11. <7> [10106] Unable to lock the remote ID '59dacbc4-eac4-418a-b2e1-ebe30700e4f8                                                                                           ', will try again
W. 2016-03-26 15:28:11. <main> [10050] ODBC: [SAP][ODBC Driver][SQL Anywhere]User 'syncnow' has the row in 'ml_database' locked (ODBC State = 40001, Native error code = -210)
W. 2016-03-26 15:28:11. <7> [10106] Unable to lock the remote ID '59dacbc4-eac4-418a-b2e1-ebe30700e4f8                                                                                           ', will try again
W. 2016-03-26 15:28:12. <main> [10050] ODBC: [SAP][ODBC Driver][SQL Anywhere]User 'syncnow' has the row in 'ml_database' locked (ODBC State = 40001, Native error code = -210)
W. 2016-03-26 15:28:12. <7> [10106] Unable to lock the remote ID '59dacbc4-eac4-418a-b2e1-ebe30700e4f8                                                                                           ', will try again
W. 2016-03-26 15:28:13. <main> [10050] ODBC: [SAP][ODBC Driver][SQL Anywhere]User 'syncnow' has the row in 'ml_database' locked (ODBC State = 40001, Native error code = -210)
W. 2016-03-26 15:28:13. <7> [10106] Unable to lock the remote ID '59dacbc4-eac4-418a-b2e1-ebe30700e4f8
W. 2016-03-26 15:38:11. <10> [10050] ODBC: [SAP][ODBC Driver][SQL Anywhere]User 'syncnow' has the row in 'ml_database' locked (ODBC State = 40001, Native error code = -210)
E. 2016-03-26 15:38:11. <10> [-10343] The remote database identified by remote ID '59dacbc4-eac4-418a-b2e1-ebe30700e4f8                                                                                           ' is already synchronizing or the database connection is unusable: unable to access the lock for that remote ID

I had two remotes syncing at the same time. I resolved the problem by spreading the sync times so only one remote would sync at a time. This seems like it could be a problem if there were a lot of remotes? I have only one ml server running on the consolidated (sa 17) db. Shouldn't mlsvr serialize the remotes so the locking wouldn't be a problem? Is there something I am missing?

Thanks.

asked 30 Mar '16, 12:31

jimboidaho_gplus's gravatar image

jimboidaho_g...
1469916
accept rate: 0%


This error occurs when two databases that have the exact same remote-ID synchronize at the same time. What you are missing is that in version 12, we introduced better support for MobiLink Server farms and closed a gap where two database with the same remote ID could synchronize at the same time.

From : http://dcx.sap.com/index.html#1200/en/sachanges/newinnsbruck-sectb-3789084.html

Enhanced support for server farms   New remote ID locking logic is used to prevent redundant synchronizations from the same remote ID in MobiLink high-availability. The -ss option no longer needs to be set. An arbiter is required when using server-initiated synchronization or QAnywhere with a MobiLink server farm.

This change in the way remote ID locking occured affects MobiLink whether high-availability is used or not. Each remote database in your environment should have a unique remote ID, and if they don't, you will almost certainly run into this problem.

If you are creating remote databases by copying a remote database that has already synchornized (or had a remote ID assigned to it), you'll need to clear the remote_id value, which means a GUID will be auto-assigned on the next synchronization.

SET OPTION PUBLIC.ml_remote_id = '';
permanent link

answered 30 Mar '16, 12:56

Reg%20Domaratzki's gravatar image

Reg Domaratzki
7.7k343118
accept rate: 37%

edited 30 Mar '16, 12:59

Will setting the ml_remote_id = '' cause a total resync from the consolidated to the remote with a new id?

(30 Mar '16, 13:06) jimboidaho_g...
Replies hidden

No.

Don't forget to pay attention to the documentation at http://dcx.sap.com/index.html#sqla170/en/html/8146ea136ce2101495c491b579814da9.html*loio8146ea136ce2101495c491b579814da9 which mentions that it is important that you perform a full and successful synchronization before changing the remote ID of a database to ensure that no data is lost.

(30 Mar '16, 13:28) Reg Domaratzki
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:

×371
×246

question asked: 30 Mar '16, 12:31

question was seen: 1,854 times

last updated: 30 Mar '16, 15:16