Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Application contexts in multi-user environments

Re: Application contexts in multi-user environments

From: Holger Baer <holger.baer_at_science-computing.de>
Date: Mon, 19 Apr 2004 13:29:49 +0200
Message-ID: <c60d7e$sim$1@news.BelWue.DE>


Ed Holloman wrote:
> [Oracle9i Enterprise Edition Release 9.2.0.3.0]
>
> Hi,
>
> I'm experimenting with application contexts as a means of utilizing
> bind variables in variable WHERE clauses.
>
> In a multi-user environment where the database is accessed from an
> application using a single user id, are there any conflicts involved
> when the same procedure is accessed multiple times and the same context
> variable is set to different values by each call? In other words, can I
> assume that between the time the user_id of my_context is set and the
> query is executed in procedure call 1 that those values will be used
> and not be affected by other procedure calls also setting the user_id
> of my_context?
>

I'd suggest a good reading and understanding about what sessions in Oracle do; http://asktom.oracle.com and http://tahiti.oracle.com will provide you with enough information.

To answer your question in short: What you do is a valid approach, and quite scalable too. The fact that you have to use dbms_session to set the value of a context variable is some kind of a hint, ain't it?

HTH
Holger Received on Mon Apr 19 2004 - 06:29:49 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US