Home » SQL & PL/SQL » SQL & PL/SQL » How to share a context
How to share a context [message #272172] Thu, 04 October 2007 03:06 Go to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
In the application I work on we use a context to bind variables to a dynamic cursor. The number of binds is not known in advance, so using a context is a great way to do it.
Now we are temporarily short on servers, so I want to share an instance with multiple versions of the application. No problem, except that contexts are (or seem to be) defined globally to the instance.
In the context, the schema-name with the package that can set elements in the context is defined, so I have to choose which schema can use the context.

Now this way of installing is not even close to what the customer ever will do, so I don't want to create a third user that owns the context and use that.

Anybody any ideas?

Used db-version: 9.2.0.7

[Updated on: Thu, 04 October 2007 04:28]

Report message to a moderator

Re: How to share a context [message #276168 is a reply to message #272172] Wed, 24 October 2007 04:28 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
bump
Re: How to share a context [message #276335 is a reply to message #276168] Wed, 24 October 2007 22:02 Go to previous messageGo to next message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Instead of storing the values in a context, you could store them in a persistent packaged Associative Array. Then instead of using SYS_CONTEXT() to retireve the values, you use a function from your package.

Ross Leishman
Re: How to share a context [message #276358 is a reply to message #276335] Thu, 25 October 2007 00:04 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Why is it always so I keep searching for a solution instead of rethinking the problem?! Nice and elegant solution, and very usable because we don't really need the extra level of security an application-context offers.
Thanks, Ross!
Re: How to share a context [message #290320 is a reply to message #276358] Fri, 28 December 2007 06:20 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
This is a similar thread. Cross-linking this one.
Previous Topic: Problem with ref cursors as out parameter
Next Topic: How select all days of specific month from dual ???
Goto Forum:
  


Current Time: Mon Dec 05 09:06:39 CST 2016

Total time taken to generate the page: 0.27689 seconds