Subject | Re: [firebird-support] Re: Connecting to Firebird database from two or more pc with same username |
---|---|
Author | Ann Harrison |
Post date | 2016-04-18T14:34:21Z |
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.htmlMaybe I'm confused, but I think Virgo is asking about two different connections using the sameuser credentials, not a an application server with a single connection to the database and multipleconnections from the client to the application. Different connections have different USER_SESSIONnamespaces even if they use the same user credentials, I think.Cheers,Ann