Subject Re: [firebird-support] Re: Connecting to Firebird database from two or more pc with same username
Author Ann Harrison
On Mon, Apr 18, 2016 at 10:03 AM, 'Thomas Steinmaurer' ts@... [firebird-support] <firebird-support@yahoogroups.com> wrote:
> On Thu, 14 Apr 2016 12:28:41 +0200 (CEST), 'Thomas Steinmaurer'
> ts@... [firebird-support] <firebird-support@yahoogroups.com>
> wrote:
>>
>>
>> Yep. If one want to have some sort of client login/user available on
>> the server-side, which might be totally different to the Firebird
>> user used upon connect time, a common approach is to put that login
>> name into a context variable via RDB$SET_CONTEXT(...) and query that
>> in context of the connection with RDB$GET_CONTEXT(...). Needless to
 
> Virgo Pärna wrote:
>
>       Unless I'm misunderstanding it, it is not possible to read
> context variable from another connection?

No. There are two "namespaces" USER_SESSION and USER_TRANSACTION which also define the visibility of context variable values.

Check out: http://www.firebirdsql.org/refdocs/langrefupd25-intfunc-set_context.html

Maybe I'm confused, but I think Virgo is asking about two different connections using the same
user credentials, not a an application server with a single connection to the database and multiple
connections from the client to the application.  Different connections have different USER_SESSION
namespaces even if they use the same user credentials, I think.

Cheers,

Ann