on 2019 Mar 19 2:16 PM
We are using SQL Anywhere v12.0.1.4436 on a Windows Server 2016 box. We are trying to create a remote database that will sync using dbremote on one end with a consolidated database (1) running SQL Anywhere v12. On the other end it will sync with another consolidated database (2) running SQL Server using Mobilink.
Setup steps: 1. Extract database and sync up using dbremote. 2. Setup publication, user for Mobilink to sync with SQL Server. 3. Run Mobilink to sync with SQL Server. 4. The very next time we run dbremote, it crashes with an "Internal Error - dbremote" popup window when it is "scanning logs starting at offset..." 5. We are now in a place where we can no longer sync from consolidated database (1).
Any ideas of where to go next or what may be causing our issues.
Thanks, Brian
Brian and I followed up offline since I needed his database to reproduce the issue. I though I should come back to the forum and share our progress since we figured out the root cause of the crash and were able to workaround the problem.
dbremote was crashing because it scanned a large number of consecutive APPLICATION CONNECTION REGISTRATION STAMP entries in the transaction log. I believe (but still need to confirm) that "large" in this case means more than 32. It's still not clear why dbremote is crashing, and why dbtran and dbmlsync do not crash when scanning the same section of the log, and fixing the crash is still a work in progress. More importantly for Brian, we were able to find a workaround, allowing him to stay at v12.
What is an APPLICATION CONNECTION REGISTRATION STAMP log entry?
An APPLICATION CONNECTION REGISTRATION STAMP is placed in the transaction log by dbmlsync as a placeholder so that dbmlsync knows when scanning the log to send operation to the MobiLink Server to ignore operations in the transaction log for this connection, since it is dbmlsync applying the download stream. In most cases, you see two of these entries for a synchronization, the first indicating that operations should be ignored, and a second to indicate that operations should no longer be ignored. However, if you have defined hooks procedures that fire during the download (for example sp_hook_dbmlsync_download_table_begin), dbmlsync writes APPLICATION CONNECTION REGISTRATION STAMP entries into the log surrounding the execution of the hook procedure, to make sure the operations executed in the hook are not ignored. If you've defined a single hook procedure that fires for every table, and you have "x" tables, you will end up with "2x+2" APPLICATION CONNECTION REGISTRATION STAMP entries in the transaction log for each synchronization.
Now imagine that your download stream from the MobiLink Server contains no data, and the execution of the hook procedure does not result in any operations being written to the transaction log. If you have 22 tables in your remote database, you end up with 46 consecutive APPLICATION CONNECTION REGISTRATION STAMP log entries in a row, and dbremote (but NOT dbmlsync or dbtran) will crash processing these operations in the transaction log.
There are two workarounds to avoid the issue :
An example for workaround #2 might look something like :
create procedure sp_hook_dbmlsync_download_table_begin() begin declare @uuid varchar(128); set @uuid = UUIDTOSTR(newid()); set option PUBLIC.logSomething = @uuid; message 'sp_hook_dbmlsync_download_table_begin does stuff now'; end;
Setting an option will be logged, as long as the option changes, which is why I've gone to trouble of using a GUID value in the example above.
Reg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
10 | |
10 | |
10 | |
10 | |
9 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.