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

Hi all,

I'm using UDB on Windows Mobile as remote DB in a MobiLink synchronisation. I'm using a dbmlsync call to start the synchronisation. For a performance analysis I'd like to trace all database operations during a synchronisation (not the MobiLink log but all update/delete/insert/select operations). Is that possible?


Chris Werner

p.s. Using ASA 16

asked 18 Apr '14, 06:28

Chris%20Werner's gravatar image

Chris Werner
accept rate: 100%

Comment Text Removed

Are you asking about all the database operations being performed on the UDB, or all the database operations being performed on the consolidated database? If the latter, what DBMS are you using?

(18 Apr '14, 10:03) Breck Carter

About all the database operations performed on the UDB.

(18 Apr '14, 14:41) Chris Werner

Dbmlsync is for synchronizing SQL Anywhere databases and is not used with UltraLite. If you are using dbmlsync, experts like Breck and others will be attracted to your question if you edited the title to "dbmlsync debug/trace log".

If you are using UltraLite, you can monitor for events (see the DCX topic UltraLite - Database Management and Reference ยป UltraLite database tasks and features - You can also turn on logging at the MobiLink server to document all the rows received and downloaded (assuming you are not using the direct row handling API).

Perhaps you meant to say that you are using ActiveSync to start the synchronization? (

permanent link

answered 18 Apr '14, 12:34

PhilippeBertrand%20_SAP_'s gravatar image

accept rate: 22%

Thanks for your answer!

Yes, that's right I should have copied it from the script instead of guessing. I meant to say I'm using ulsync to start the synchronization (in this special case, otherwise synchronization is started via the ul engine from an application).

What I'm after is some kind of logfile showing the database actions the ul engine performs while synchronizing. I'm much more familiar with SQL Anywhere databases (hence my error in the first question). In SQL Anywhere I'd use the Log File option of the ODBC datasource to achieve what I'm after.

I'm aware of the ML server logging possibilities but that's not what I want because it shows actions on the MobiLink level. I'm not sure if monitoring for events can help me because there is no monitoring instance, just a cmd script calling ulsync.


Chris Werner

(18 Apr '14, 14:27) Chris Werner
Replies hidden
Comment Text Removed
Comment Text Removed

Where are you running ulsync?

(18 Apr '14, 16:34) PhilippeBert...

For this is a test case I'm running ulsync on a Windows machine against a UDB. I hope to get some insights what's going on in the UDB engine on deletes & inserts versus updates (all issued by download_cursor and download_delete_cursor scripts on the consolidated machine). This is because there are some rumors about the ml download into a UDB saying it'd be better to delete all changed rows (using download_delete_cursor for all changed rows but not only deleted ones) and then inserting them again (using download_cursor as usually)as to updating those rows (which means having only deleted rows in the download_delete_cursor as usually). The real application will run on Windows CE but for the moment I'm interested in testing the synchronization on Windows.

(20 Apr '14, 05:00) Chris Werner
Replies hidden

If you really wanted to optimize the performance, you would monitor the page reads and writes, and then, you would only get an answer suitable for a particular sync (set of downloaded rows) against a particular database.

It all comes down to how many update rows are being downloaded versus how many rows there are currently in the table (which has many indexes). It is feasible that a large number of updates would cause index and data pages to come in and out of the cache sufficiently that it would be simpler to truncate the table and download all the roads. You have to consider the cost of all that data on the wire. (also Ultralite has a dynamic cache so it will work hard to be good)

Conclusion: unless you are changing a most of rows in a table every sync, let MobiLink do deltas.

p.s. Order downloads by primary key

(20 Apr '14, 10:15) PhilippeBert...

Hi Phillipe,

thanks for your answer. Your conclusion is my general opinion too, but in the past I was concerned with SQL Anywhere remote databases only, Ultralite is completely new to me. I found this technique to delete all changed rows using download_delete_cursor prior to inserting them on download_cursor in a project which was already started when I came in. When I asked about it the developer argued for it with udb client performance, fragmentation and main memory usage, going into details like read/write versus delete/write pages and the lack of an INSERT ON EXISTING DELETE statement in Ultralite. At the end something like "We did it this way all the time so if you dare to change it, just do it" came out and I gave in. For the moment ;-)

Thanks again, Chris

(22 Apr '14, 06:50) Chris Werner
Replies hidden

> lack of an INSERT ON EXISTING DELETE statement in Ultralite

I know, it's awful, isn't it? It's missing from SQL Anywhere too, and hardly a day goes by when I don't curse and knash my teeth because of that :)

[sorry, couldn't resist, no insult intended]

(22 Apr '14, 09:03) Breck Carter

Oops, INSERT ON EXISTING DELETE sound like a Freudian slip ;-)

(22 Apr '14, 10:33) Chris Werner
showing 4 of 7 show all flat view

Have you tried ulsync --log option?

permanent link

answered 18 Apr '14, 16:31

PhilippeBertrand%20_SAP_'s gravatar image

accept rate: 22%

Not yet but I'm afraid this option will result in a logfile similar to the one generated by the -v option of dbmlsync which is not what I'm after. Anyway I'll give it a try when I'm back to office.

(20 Apr '14, 05:02) Chris Werner

Meanwhile I tried the --log=<logfilename> option and found the -v option for ulsync. Those options generate a rather poor output compared to the logging possibilities of a full sa client. Besides my original question: Are there any options to improve the logging of the synchronization of UDB remote databases?

(22 Apr '14, 06:28) Chris Werner
Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 18 Apr '14, 06:28

question was seen: 3,622 times

last updated: 22 Apr '14, 10:33