on 2020 Sep 10 10:49 AM
According to the docs., CURRENT REMOTE USER returns the user ID of the remote user (only in case of SQL Remote).
Is there a way to make use of this special value also on Mobilink Server? So that I can distinguish within some procedure whether the transaction is a local or is coming from a remote database (throug mobilink)?
Request clarification before answering.
The MobiLink Server is just an ODBC application that can connect to any number of different consolidated databases (SQLA, Oracle, DB/2, MSS), so there is nothing built into the SQL Anywhere database engine to automatically detect whether it's the MobiLink Server connected.
It's easy enough to do this yourself programmatically though.
Option #1 : Add "con=ThisIsMobiLink" to the connection string that MobiLink uses to connect to the consolidated database. Your stored procedures can now use the name of connection to determine whether it's MobiLink.
create procedure end_upload() begin if CONNECTION_PROPERTY('Name') = 'ThisIsMobiLink' then message 'in end_upload'; end if; end;
Option #2 : Create and drop a connection level variable in the begin_synchronization and end_synchronization events and then use the VAREXISTS function to check for the existence of the connection level variable.
Other may suggest other options, but those two are the easiest IMHO.
Reg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See also this similar question... with quite similar participants... 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
30 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.