I am trying to get an Ultralite database to connect to a remote notifier for server initiated syncing. Whenever I call the ML GET SERVER NOTIFICATION it always returns null, regardless of what key value I put in there. The key value represents the same as the poll_key value for the SQL Anywhere Listener correct? This should have been included sorry. SQL Anywhere 12.0.1.3554, same version of ultralite. In the ultralite I've just been calling SELECT ML_GET_SERVER_NOTIFICATION('MyTestNotifier', 'tcpip{host=testServer;port=1234}', null); SELECT ML_GET_SERVER_NOTIFICATION('MyTestNotifier', 'tcpip{host=testServer;port=1234}', 'poll_key'); as the example states. testServer is actually the IP address of my testServer, and the port is specified in the mobilink servers -x tcpip{} value. These values all work on the SQL Anywhere remote database. It returns the subject and content and allows me to perform different actions based on the subject. But the ultralite call always returns null. I've also tried substituting the notifier key 'null' with the value found in my poll_key for the SQL Anywhere remote database. Still returns null. |
I apologize, after reviewing the log files it turns out this was an issue with our setup. Setting the verbosity of SIS to 5 was the key in figuring out what was happening. call ml_add_property( 'SIS', 'global', 'verbosity', 5 ); Looking through the log files I noticed that my pollkey value kept getting removed from the request cursor. I would set the request cursor value, check the log file the pollKey was set. I would check the request cursor literally 30 seconds later and the pollKey value was removed from the request cursor. I stopped the mobilink server, started a new one up with a different port. Retried the test, and everything worked. I got my first value back from ultralite. It turns out, not one.. but two other developers were using the same user I was. And one of them had set our autosync property to 1 minute. Every time a sync occurred our sync scripts remove the user from the request cursor. Between the three of us using the same test user we were syncing too often, and my test wasn't working. Whereas my test with the remote database was working because it was using the dblsn at a rate of 5 second intervals. Thanks Tim and Reg for the time spent responding to this question. 3
Glad to hear the extra verbosity helped out, and thanks for posting back with the solution. Please don't forget to drop the vebosity back down when you go into production, since verobsity 5 is a bit of performance hit.
(30 Mar '12, 09:34)
Reg Domaratzki
2
@Peacock Was that the MobiLink user? If so, it might be better to use the remote ID...
(30 Mar '12, 10:41)
Graham Hurst
|
Can you say what version of SQL Anywhere you are using, and what UltraLite platform, and show exactly how you are calling the get-server-notification function?
The first thing I would do is check for an error code returned by UltraLite. (How you do that depends on the platform. What kind of UltraLite device are you using?)
The Ultralite used in Windows Mobile 6.5.
Is that C++ or .NET interface? :)
I was going to put it, but thought nahh..
It's the .Net interface. Since I can't figure out how to submit a bug, FYI the ultralite intellisense returns ML_GET_SERVIER_NOTIFICATION() with the extra "I" in the server.
Any chance for a response on this? Are you away on march break?
I'm planning on looking into this shortly, but it might not be until Tuesday (March 20th).
Thanks for reporting that typo! We will correct it.
Any chance you've been able to have a look at this?
My apologies. Tim asked me to look into this about two hours before 2 of our larger customers escalated issues, and I needed to address their issues before getting back to addressing issues here on the forum. I'm looking into your issue right now, and expect to have something meaningful to say before the end of the day.
Can you first set the verbosity for SIS to 5 with a command similar to the one below on your consolidated database, and then start the ML Server with the -v+ switch?
You might need to set the value above in your file you specify after the -notifier switch on the mlsrv12 command line as opposed to using the stored procedure call. It all depends on how you've defined the rest of the SIS options.
Once you've started the MobiLink Server, call ml_get_server_notification from your UltraLite database.
If you could post the MobiLink log file that is generated, that should help us figure out whether the problem is a configuration problem for SIS at the consolidated, or whether the problem is on the UltraLite side when it receives a proper notification.
Thanks, Reg
Hi Reg, I've generated the requested mobilink log files. I generated one for our remote database setup which seems to be working, and then another for our ultralite setup. Rather than posting them to the public forum is there somewhere I can email them?
Thanks for generating a good and bad request. Can I assume that you use the same consolidated database in each test?
You can e-mail them to me directly. My e-mail address is firstname.lastname@sybase.com, but you'll need to replace "firstname" and "lastname" with my real first and last name.